I've got this Ubuntu server I'm running, and it's really handy to take the load off of my laptop, but I'd like to know how to set up a virtual machine on it that I can ssh into. Obviously, this removes things like VirtualBox from the equation, since I'm currently in a command line.

I've googled this question, but to no avail. Everything just tells me to run Ubuntu server from a VirtualBox or something, but my laptop can't handle that.

I'd like to keep things in the command line, if possible. Thank you for your help!

(Ideal situation: I create a virtual machine with no GUI from command line, while currently in an ssh connection to a home server. Then I ssh into that virtual machine. No GUIs involved whatsoever.)

  • “Obviously, this removes things like VirtualBox from the equation, since I'm currently in a command line.” Install Vagrant and VirtualBox on that server and you can do 100% of this via the command line without any GUI involved. How to do that? That’s out of the scope of what can be answered in response to a question on this site. Nov 25, 2022 at 3:07

1 Answer 1


Thanks to @Giacomo1968, I now have an answer.

  1. Install VirtualBox and Vagrant on the server. (via ssh connection)
  2. Go to VagrantCloud and select your box. For the sake of this example, I'm using Ubuntu
  3. Create a folder called Ubuntu, and cd into it
  4. Initialize the vagrant box [vagrant init ubuntu/trusty64]
  5. Activate the virtual machine [vagrant up]
  6. After, ssh into it [vagrant ssh]

NOTE: if it asks you for the password for the user vagrant, by default the password is "vagrant" too. (without quotes).

To shut down VM: [vagrant halt]

source: https://www.taniarascia.com/what-are-vagrant-and-virtualbox-and-how-do-i-use-them/


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.