Installing Linux in VirtualBox - Complete Guide 2023

0
Installing Linux in VirtualBox

Introduction

In this article, we will walk you through for installing any Linux Distro in VirtualBox. Maybe you are installing different Distro but steps are mostly same. In our case, we are installing Ubuntu 22.04.3 in Oracle VM VirtualBox. While Installing Linux in VirtualBox, you might get some errors and issues with your computer but don't worries, we will cover everything from beginning and still if you have confusion, I would recommend to watch the below videos. 

    Prerequisites

    There are some requirements before installing Linux in VirtualBox, please check the below requirements:

    #1: Virtualization should be enable before installing Oracle VirtualBox and you can easily check from task manager. If it is not enable then follow this article: Click Here 

    Virtualization

    #2: 4 or 8GB RAM for better experience because Linux require minimum 2GB RAM but your host machine also required some RAM to run VirtualBox and Background Apps and programs. 

    #3: Minimum 80 free Disk space required.

    Download VirtualBox

    Once you have checked all perquisites, you can download VirtualBox from the official website. VirtualBox will help to create Virtual Machine in your Host machine, which means you can run multiple Operating System on your Laptop. 

    Download from the official website: https://www.virtualbox.org/wiki/Downloads 

    Follow the Manual for installing VM BOX: User Manual


    Download Linux Distro ISO

    Once you have successfully Installed VirtualBox then you have to install ISO file of your Distribution from their official website. In our case, we are installing Ubuntu, you can follow the steps. 

    Download Ubuntu ISO: https://ubuntu.com/download/desktop

     

    Setup your Linux 

    #1: Launch your VirtualBox and click on "New" icon.  


    #2: Enter anything in name which will reflect as Hostname of the machine and locate the ISO file and mention the path in the ISO Image.



    #3:Setup your Username and Password for login into machine. 



    #4 Allocate the Hardware Usage for VM, minimum 2 GB required. 


    #5 System starts rebooting itself and will update all the packages.


    Update and Upgrade your Linux 

    Once you have successfully installed Linux, it's time to manually check the Firmware and packages upgrade. 

    #1: Launch the terminal. 

    #2: Run the below command for updating packages and upgrading Linux core.

    sudo apt-get update && apt-get upgrade -y


    Fix Screen Resolution 

    Once you have successfully update your Linux, now we have to fix Screen Resolution. this is optional if you don't have issue with full screen then you can skip this part. 

    #1: Click on above Devices icon and then click on Insert Guest Additions CD image.



    #2: Then click on CD icon.


    #3: Open a Terminal by right clicking on same directory. 



    #4: Run the below command in the terminal. 

    ./autorun.sh



    #5: That's it, you can maximize your screen. 

    Fix Sudoers File in Ubuntu. 

    If you are trying to switch user to root but you are getting this error "user is not in the sudoers file. This incident will be recorded"  Then follow the below steps to fix this issue. 



    #1: Run the below command for login into root user. 

    su root

    #2: Edit the sudoers file for adding your username.
    sudo nano /etc/sudoers

    #3: Add your username after root in privileges 

    "your_username"  ALL=(ALL:ALL) ALL



    #4: exit from the root and try it again with sudo su

    exit



    #5: Enjoy your Linux :) 





    Tags

    Post a Comment

    0Comments
    Post a Comment (0)