This is an old revision of the document!
Table of Contents
Part 1: How to Install and Setup Debian on a Virtual Machine
Installation
This section will show you how to install Debian OS on a VirtualBox Virtual Machine.
Note: The version we will be using is Debian 12.9.0 codenamed Bookworm.
1. Install Debian version 12.9.0 .iso file from the website www.debian.org.
2. Open Oracle VirtualBox.
3. Click on New.
4. Go under the Name and Operating System tab.
5. Type in the name of the OS which is Debian.
6. At ISO Image, click the drop down menu and click Other.
7. Choose the downloaded Debian .iso file.
8. Go under the Unattended Install tab.
9. Change the username and password to your liking.
10. Go under the Hardware tab. You can change the Base Memory and Processors according to your liking. We will keep it as is.
11. Go under the Hard Disk tab. You can change the hard disk space and other settings. We will keep it as is.
12. Click Finish.
13. Wait for the installation to finish.
14. After installation, it should look like this.
15. Click the username and sign in using the password you set before.
16. Debian OS is now installed successfully!
Enabling root and superuser on Debian
This section will show you how to enable root account and superuser on Debian.
1. Click on Activities on the top left corner of the screen. You can also press the Windows key as a shortcut.
2. Search for Settings and click on it.
3. On the left pane, scroll down or search for Users and click on it.
4. On the blue bar at the top of the page, click Unlock.
5. Then, enter your user password as the Administrator's password. In my case, it is 1211112299. Once that is done, you should notice that the blue bar is gone.
6. Now press Activities again, and search for Terminal. Click on it.
7. Try using a sudo command and see the results.
sudo whoami
The user megat is not in the sudoers file, we need to change that.
8. Type the following command to go into root. The command may not work without doing steps 1-5.
su root
Notice that megat@vbox changed to root@vbox.
9. Type this command to edit the sudoers file.
sudo visudo /etc/sudoers
10. Search for this line in the file:
# User privilege specification
11. Add the following line to that section of the file. Note that you should replace megat with your username.
megat ALL=(ALL:ALL) ALL
12. Save the file using Ctrl + O → Enter → Ctrl + X.
13. Type this command to exit root.
exit
14. Type any sudo command again and see the difference.
sudo whoami
Congratulations, your user now has sudo permissions!
Installing Windows Manager
Debian 12.9.0 comes preinstalled with GNOME desktop environment. The following steps will show you how to install another desktop environment.
- Login as usual.












