This is Kamijo of the Development Department.
The default shell has been zsh since the macOS "Catalina" last year or so.
I use windows in the company and mac at home, but the usability is different in bash and zsh of wsl.
This time, I'd like to introduce zsh and prezto to wsl(ubuntu) to make the terminal cool? I'll try to make the terminal cool.
Click here for table of contents
- 1. zsh installation
- 2.prezto introduction
- 3. choose a theme
- 4. at the end
zsh introduction
apt install zsh
When the installation is complete, the
zsh
allows you to switch shells.
However, it is troublesome to switch every time, so let's change the login shell.
which zsh
and you will see "/usr/bin/zsh" or something like that.
chsh
to change the login shell.
Enter the new value, or press ENTER for the default
Login Shell [/bin/bash]: /user/bin/zsh "<< Type what you just got here.
You have now changed your login shell.
Introduction of prezto
Clone the repository.
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
Set the EXTENDED_GLOB option of zsh.
setopt EXTENDED_GLOB
Create a configuration file.
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done
Shell Restart
exec $SHELL -l
If it looks like the image, you have succeeded.
Select a theme
prompt -p
You can preview the theme with
If you decide which theme you want to use, write down "theme" and "parameter" if necessary.
Set the theme to "~/.zpreztorc".
vim ~/.zpreztorc
Per line 119.
zstyle ':prezto:module:prompt' theme 'sorin'
I think that's what it is.
Enter the "theme" and "param" that you just did here.
Example: theme: fade param: blue
zstyle ':prezto:module:prompt' theme 'fade' 'blue'
Rewrite it like this.
Restart the shell, and if the theme is reflected, you've succeeded! Thanks for your help!
Finally.
I want to be more particular! If you want to be more particular, we recommend the Powerlevel10K theme.
In addition to changing the appearance, you can display a variety of information.
This is just an introduction, so if you're curious, please check it out.