Step 1. Install required packages.
Before installing VirtualBox Guest Additions on Ubuntu 22.04 we need to install some required packages. So open the terminal and run the following command.
sudo apt install linux-headers-$(uname -r) build-essential dkms
Step 2. Install Guest Additions using virtual box.
In order To install VirtualBox Guest Additions on Ubuntu virtual machine, Got to VirtualBox - select the Devices from VirtualBox host application menu - click Insert Guest Additions CD image.
Step 3. This will open a pop up window and it will ask you to run it. Press Run button
After pressing Run button it will install VirtualBox Guest Additions on Ubuntu 22.04 . Press enter to close the window.
or. If it pop out error dialog, you can open **VBox-GAs-x.x.x**, and find autorun.sh, and run it in terminal to install additions.
Step 4. Shut down your Ubuntu 22.04 Guest.
Step 5. Start Ubuntu 22.04 virtual machine and check if copy and paste works.
Finish