Terminal for Ubuntu
1. Install z shell and oh-my-zshell
sudo apt-get update
sudo apt upgrade
sudo apt install zsh
sudo apt-get install powerline fonts-powerline
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
vim .zshrc
ZSH_THEME="agnoster"
chsh -s /bin/zsh
cd /.oh-my-zsh
# syntax highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.zsh-syntax-highlighting" --depth 1
echo "source $HOME/.zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> "$HOME/.zshrc"
# change back to bash
# chsh -s /bin/bash
2. Enable conda command
# open bashrc
vim ~/.bashshrc
vim ~/.zshrc
# copy below from bashrc to zshrc
# added by miniconda3 5.3.0 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/miniconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/miniconda3/etc/profile.d/conda.sh" ]; then
. "/miniconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<<
# Restart zshell
source ~/.zshrc
3. Level Up: install power10k theme
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>! ~/.zshrc
# config
p10k configure
# Fix zsh compinit: insecure directories and files
compaudit | xargs chmod g-w
compaudit | xargs chown root
4. Install Meslo Nerd Font
Download these four ttf files:
Double-click on each file and click “Install”. This will make MesloLGS NF
font available to all
applications on your system. Configure your terminal to use this font:
- GNOME Terminal (the default Ubuntu terminal): Open Terminal → Preferences and click on the
selected profile under Profiles. Check Custom font under Text Appearance and select
MesloLGS NF Regular
.
5. Change terminal settings for vscode
# install vscode in Ubuntu
sudo snap install --classic code
View => Command Pallete => Type settings
and Select Preferences: Open Settings (JSON)
=> Add the below lines
{
"terminal.integrated.fontFamily": "MesloLGS NF",
"terminal.integrated.shell.osx": "/bin/zsh"
}