How do I copy and paste from a Windows 7 host machine to a Ubuntu 12.04 terminal VirtualBox?
You say you're running Ubuntu Server, which usually means you aren't using any graphical frontend. But Copy&Pasting in Ubunu is managed by the Window Manager or Display Manager. So you can't really copy/paste there.
However, you could try enabling an SSH Server on the Ubuntu VM and then access it from the Windows console:
In VirtualBox's config: Select VM, then Settings → Network → Enable Adapter 1, attach to NAT.
In Ubuntu server:
- Install the OpenSSH server package:
sudo apt-get install openssh-server
- Configure the server according to the OpenSSH server guide
In Windows:
- Download and install PuTTY
- (Re-) Boot the VM
- Use PuTTY to connect to Ubuntu Server (you can get the IP from
ifconfig
in Ubuntu's terminal). Use your Ubuntu username and password.
There you go. You should now have a Ubuntu Server terminal session in your Windows console. You can exit it using exit
, logout
or something in PuTTY.
Related videos on Youtube
gurupal singh
Updated on September 18, 2022Comments
-
gurupal singh over 1 year
I am running VirtualBox on my Windows 7 laptop, running an Ubuntu 12.04 (Precise Pangolin) Server as guest machine.
I would like to copy some commands (which are too long to write on terminal) from Windows 7 (host machine) to my guest machine's terminal so that it will be easy for me to run commands.
I had guest additions successfully installed.
-
s3lph over 9 yearsYou say you're running Ubuntu Server, which usually means you aren't using any graphical frontend. But Copy&Pasting in Ubunu is managed by the Window Manager or Display Manager. So you can't really copy/paste there.
-
gurupal singh over 9 years@the_Seppi yes i'm using Ubuntu server (only command line). So, you means it is not possible ??
-
-
gurupal singh over 9 yearsVoila !! thanks for the answer. it worked but is this the same terminal session that what is in Ubuntu server ?
-
s3lph over 9 yearsNo, it starts a new bash session, which you probably can't access from the VM's screen.
-
gurupal singh over 9 yearsNo, i mean if i run any command on putty terminal, it will the same for Ubuntu server ...right ??
-
s3lph over 9 yearsI don't really understand what you're asking... The terminal you see in PuTTY is a terminal of your Ubuntu server, which you interact with via the network. Everything you execute there will be executed in the VM, but you will only see the output in PuTTY, not in the VM's window.