How to Install Ubuntu on Windows Using WSL

Install Ubuntu on Windows Using WSL

Easy Guide to Setting Up Ubuntu on Windows (WSL)

  1. Enable Windows Subsystem for Linux (WSL)

    Go to Control Panel > Programs and Features > Turn Windows Features on or off.

    WSL on control panel

    Activate the Windows Subsystem for Linux.

    WSL feature on control panel


  1. Install Ubuntu from Microsoft Store

    Visit the Microsoft Store and install the latest version of Ubuntu.

    windows store install ubuntu


  1. Initial Setup

    Upon installation, the command prompt will open, prompting you to create a UNIX username and password.

    ubuntu-first-boot-and-asking-for-unix-username


  1. Switch to Root User

    By default, the root user in Ubuntu has no password, and the default username is root. It's recommended to set a password for enhanced security.

    Run the following command to switch to the root user:

    sudo -i
    

    Note: sudo -i will prompt for your user account password that you set during the first boot.

    alter root password


  1. Set a Password for Root User

    Once switched to the root user, the username displayed will change to root.

    To set a new password for root, run:

    passwd
    

    set-password-for-root-user


  1. Switch Back to Your Regular User Account

    To switch back to your normal user account, use the su command:

    su yourUserName
    

    switch-user-from-root-to-regular-user


  1. Explore the Ubuntu File System from Windows

    Open Windows Explorer and paste the following path into the address bar:

    \\wsl$
    

    Then press Enter.

    access ubuntu file system from windows

    It might take a moment to load depending on your system performance.

    wsl on windows explorer


  1. Default Launch Directory

    By default, this directory appears when you launch Ubuntu through the terminal.

    wsl on explorer


Happy Linuxing on Windows! 🚀


Related posts