Debian VM setup

This article is for setting up Debian on VirtualBox.

Download Debian

Go to the official site of Debian;
In Getting Debian page, download the small installation image (32-bit/64-bit).

Install Debian

Create a Debian VM in VirtualBox;
Insert the Debian ISO into the empty slot in Setting/Storage/Controller: IDE;
Start the VM and follow the steps to install Debian.

Install Guest Additions Driver

Start user session (login) in command line (Ctrl + Alt + F1/F7 to switch between GUI and command line);
Execute sudo apt-get install build-essential linux-headers-$(uname -r);
In the VM window, select Insert Guest Addition CD Image... under Device menu;
Execute sudo bash /media/cdrom/

Setup Shared Folders

Open Devices/Shared Folders/Shared Folders Settings
Under Shared Folders, click adds new shared folder;
Choose Folder Path, and check Auto-mount and Make Permanent, and click OK
Option 1: sudo nano /etc/group and edit the line starts with vboxsf to vboxsf:x:[number (don't change)]:[username1],[username2],...
Option 2: sudo adduser [username] vboxsf

Setup Host-only Network

Go to File/Preference/Network;
Click Adds new host-only network, and take a note of the ip address (referred as noted ip/netmask);
ifconfig is deprecated, use ip addr show or abbreviated as ip a to check network settings;
Still can use /sbin/ifconfig after sudo apt-get install net-tools;
Option 1 – peremptory: sudo /sbin/ifconfig eth1 [noted ip] netmask [noted netmask]
Option 2 – permanent: sudo nano /etc/network/interfaces

auto eth1
iface eth1 inet static
# the noted ip address
# the noted netmask
# the network of the above ip address you need to calculate
# the broadcast of the above ip address you need to calculate

This blog may not be up to date. Please see the original post from Blogger
via IFTTT.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s