How to make the Linux terminal less intimidating
As a new user to Linux the terminal can see intimidating. If you are using a Debian installation such as Debian 12 or Ubuntu here are some recommendations to make using the terminal less of a daunting task.
First thing you need to do in order to make your terminal new user friendly is install Oh My zsh. (Full Documentation here)This will allow you to install plugins for your shell and choose a theme.
First things first you will need to run the following command in your terminal
sudo apt install zsh git curlThen run
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"On the prompt to set the shell as default you can with Y enter. Then enter your password.
Verify installation by running zsh --version. Expected result: zsh 5.0.8 or more recent.
Make it your default shell if you didn't through the prompt: chsh -s $(which zsh)
You will need to logout and log back in for this to take effect
Next lets set a theme for zsh. You will want to open your shell configuration file in your text editor of choice. For this demonstration we will be using nano. You can browse all the themes here.
sudo nano .zshrcThe above command will open the configuration file in the terminal. Using the arrow keys navigate down through the file until you see the line with ZSH_THEME="robbyrussel"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time Oh My Zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="xiong-chiamiov-plus"
I prefer to use the xiong-chiamiov-plus, but feel free to use whatever appeals to you just copy paste it between the " ". In nano to save use Ctrl+o then enter to save and Ctrl+x to exit.
I suggest the following plugins for zsh for new users to the terminal:
zsh-syntax-highlighting
zsh-autosuggestions
Starting with installing zsh-syntax-highlighting we will use the following command.
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlightingNext we will install zsh-autosuggestions
sudo apt install zsh-autosuggestionsgit clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestionsAfter getting all the plugins installed we will want to open our config file again with the following command
sudo nano .zshrcYou will want to scroll down till you see the plugins=(git)
Add the following with spaces between them in the ( )
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
I like to make my plugins a bit more readable by making a new line after each plugin as you see below.
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
git
zsh-syntax-highlighting
zsh-autosuggestions
)
source $ZSH/oh-my-zsh.sh
If you have any issues I'll provide you with some troubleshooting steps below.
* **Plugins Not Working:**
* **Double-check the plugin names** in your `.zshrc` file. Typos are common!
* **Ensure you reloaded the configuration** with `source ~/.zshrc`. This is the *most common* reason plugins don't seem to work.
* **Restart your terminal** completely (close all terminal windows and open a new one). Sometimes this is necessary for zsh to fully pick up changes.
* **Check the Plugin Directory:**
Make sure the plugin directories were actually created:
ls ~/.oh-my-zsh/custom/plugins
You should see `zsh-autosuggestions` and `zsh-syntax-highlighting` listed. If not, the `git clone` commands might have failed.
* **Theme Not Changing:**
* Make sure you saved the `.zshrc` file correctly.
* Ensure you reloaded the configuration (`source ~/.zshrc`).
* Try a different theme to see if the issue is specific to one theme.
* **Oh My Zsh Not working properly after installation.**
* Check to make sure you have logged out and logged back in.
* Verify zsh is running with `zsh --version`
* Run `echo $SHELL` and make sure it says zsh and not bash.
* If all else fails remove the .oh-my-zsh folder with `rm -rf ~/.oh-my-zsh` and reinstall.
I hope this will help you become more comfortable with commands in the terminal and navigating the shell.
Thanks for reading and happy hacking.