Igor Evgen,
I always find it simpler to use
gedit as opposed to nano, but that is just a personal preference.
Ubuntu Jammy may already have gedit installed.
If not, install gedit:
Code:
sudo apt install gedit
That command you referred to will now be:
Code:
sudo gedit /etc/apt/sources.list.d/virtualbox.sources
It should open an empty document, into which you should paste the following lines:
Code:
Types: deb
URIs: https://download.virtualbox.org/virtualbox/debian
Suites: jammy
Components: contrib
Architectures: amd64
Signed-By: /etc/apt/keyrings/oracle-virtualbox-2016.gpg
Click on Save.
Click on X to close the file.
Then continue with the rest of the instructions (verify the sources file by running command................).