The Bourne-Again shell (bash) is the default shell in Ubuntu. Z shell (Zsh) is an extended bash shell with many improvements.
1 | |
Check your shell:
1 | |
This should return bash
.
Change shell:
1 | |
Enter your password, then at the prompt that says Login Shell [/bin/bash]:
enter /bin/zsh
Then restart you computer to enable Zsh.
After your computer restarts, open your terminal and you will see a message from Zsh to create a startup file (e.g. .zshrc
). Type 2
to create a .zshrc
file.
Confirm that you are in Zsh:
1 | |
You should see zsh
.
Go to https://ohmyz.sh/, click the Install oh-my-zsh button, and run the curl
command to install Oh My Zsh.
Go to https://github.com/romkatv/powerlevel10k?tab=readme-ov-file#oh-my-zsh where you can find this command:
1 | |
Copy/paste that git clone
command into your terminal’s Home directory.
Clone this repo to your Home directory:
1 | |
Create a .fonts
directory in your Home directory and copy/paste the fonts from the my-linux-setup/powerline-fonts
directory into the .fonts
directory.
If the font in your terminal window looks weird, close your terminal and open it again. The font should look normal now.
Open your .zshrc
file and change ZSH_THEME="robbyrussell"
to ZSH_THEME="powerlevel10k/powerlevel10k"
.
Close all terminal windows and open a new terminal window. You should now see the Powerlevel10k configuration wizard
in your terminal. Follow the prompts to configure your terminal.
You can run p10k configure
to start the Powerlevel10k configuration wizard
again or edit the ~/.p10k.zsh
file.
Run this command to initialize conda:
1 | |
NOTE: If your anaconda3
directory is located somewhere else, then use that file path.
Restart your zsh shell to enable conda. The init command will change your ~/.zshrc
file accordingly, setting your PATH
correctly and changing the PS1 to include the current conda environment.
Go to https://github.com/ryanoasis/nerd-fonts/releases/latest, scroll down to Assets, and find the Meslo.zip file. Click the Meslo.zip link to download the fonts.
Unzip/extract the contents of the Meslo.zip file.
Move the unzipped folder to /usr/share/fonts/truetype/
:
1 | |
Run this command to scan the font directories and configure fonts for use:
1 | |
In VS Code, open File >> Preferences >> Settings and search for terminal.integrated.fontFamily
. Set the font name you copied (from the previous step) into the Terminal › Integrated: Font Family
field: MesloLGS NF
You can verify this setting in the settings.json
file (Preferences >> Profiles >> Settings). You should see a line like this:
1 | |
Make sure that your settings.json
file is saved. You will probably have to restart your computer to see the changes in your VS Code terminal.
Source: https://stackoverflow.com/questions/62710890/font-issues-while-integrating-zsh-on-visual-studio-code
What do characters like !1 at the end of my Powerlevel10k prompt mean?