Unlocking the Power of Linux on Windows: A Comprehensive Guide to Installing WSL
Why Choose Linux? Exploring the Advantages and Benefits.
Linux stands out for robustness, security and flexibility.
Ideal choice for individuals and organizations.
Linux ensures data protection and reduces vulnerabilities.
Linux supported by a vibrant community, delivers reliable performance across a wide range of hardware systems.
Installation Process for Linux:
Open the terminal as an administrator.
Installing wsl - Windows Subsystem Linux.
wsl --install
After successful installation, restart your system.
Navigate to your system settings and search for "Windows Features".
-
Click on “turn windows features on or off”. Make sure to enable "Windows Subsystem for Linux".
Open the terminal and select "Ubuntu".
-
The ubuntu is prompted now, provide an appropriate username.
-
Set up a password. Make sure you don’t forget the password.
-
Your Ubuntu installation is now complete. To check the version of Linux, execute:
lsb_release -a
Update Ubuntu.
sudo apt update
Enter your password when prompted. Your Ubuntu is now updated.
From this step, you can follow up with: https://phoenixnap.com/kb/install-zsh-ubuntu
Install Z Shell (Zsh) on Ubuntu.
sudo apt install zsh -y
Verify the installation by checking the version of Zsh.
zsh --version
Start Zsh by typing the shell name in the terminal:
zsh
Press ‘0’ to exit the initial Zsh configuration.
Now check the default shell.
echo $SHELL
You will now get the path say for example:
-
Change the default shell by using:
chsh -s [path] [user]
Change the default shell to Zsh using:
chsh -s $(which zsh)
Enter the root password when prompted.
Now, exit the terminal and reopen it.
Install Oh My Zsh by entering:
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
Choose whether to set Zsh as the default shell when prompted.
Adding custom theme:
Open and edit the .zshrc configuration file using a text editor:
nano ~/.zshrc
Locate the following line and change your desired theme.
ZSH_THEME="robbyrussell"
Save the file by following the commands: (ctrl+O), (Enter), (ctrl+X).
Restart your terminal.
Enabling auto-suggestions:
Adding the auto-suggestion plugin repository.
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Open the .zshrc file.
nano ~/.zshrc
Scroll down to the Plugins section of the file and activate the auto-suggest plugin by adding it to Plugins as shown below:
plugins=(git zsh-autosuggestions)
- Save the file exit the text editor and restart the terminal.
Enabling Syntax Highlighting:
- Clone the plugin repository.
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlightingCopied!
- Open the .zshrc file
nano ~/.zshrc
add "zsh-syntax-highlighting" to the list of plugins:
Save the changes and exit the file.
Your ubuntu is ready!!