Source and credits are to David Morais and Pushp Vashisht
Enable Linux
First things first, we need to enable Linux. Head to Settings > Search ‘Linux’ and enable the thing. It can take a couple of minutes for the OS to install, after you’re done it should look like this
Installing Zsh and Oh My Zsh
Linux on Chrome OS does not ask for a password whenever you use commands with super user access, so we first need to do this:
sudo su && passwd #your_username yrydffy
In the same terminal window, we can install Zsh by writing
sudo apt install zsh nano -y && chsh -s $(which zsh)
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Type ‘Y’ to set your Oh My Zsh as your default bash. This command always creates a ~/.zshrc file on your home directory, which we’ll alter soon. For now, your terminal should already look like this:
Type Exit
on ‘Oh my zsh’, try using the following command to make it the default:
echo 'exec /usr/bin/zsh' >>~/.bashrc
Install Powerlevel10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc
To change zsh themes:
Hit nano ./zshrc
and change the ZSH_THEME line to the following ZSH_THEME="powerlevel10k/powerlevel10k"
. Hit Ctrl + X and ‘Y’ to save and exit.
Press Ctrl + T to open a new terminal window and type zsh
.
Setting Terminal Theme & Font
As of this writing, it is no longer possible to add transparency or change custom fonts on the Chrome OS terminal. I’ve tried several methods, like installing gnome-terminal and terminator, but the result was a downgraded version of both terminals with anti-aliasing disabled. So I’ve settled for one of the built themes, Dusk, which in my opinion looks better than most ‘stock’ themes I usually see in terminals.
I’ve also tried to give the terminal a custom CSS & font via the following command, which works, but only for the powerline-web-fonts supported fonts.
To run this, tap Ctrl + Shift + J on yout terminal and type ‘allow pasting’ - hit enter and paste:
term_.prefs_.set('user-css', 'https://cdn.jsdelivr.net/gh/wernight/powerline-web-fonts@ba4426cb0c0b05eb6cb342c7719776a41e1f2114/PowerlineFonts.css');
term_.prefs_.set('font-family', '"Source Code Pro", monospace');
In the end, you should end up with something like this
To enter P10K configuration type:
p10k configure
To update P10K type:
git -C ~/powerlevel10k pull
To uninstall the whole thing:
# Remove installations + configurations
sudo rm -f ~/.p10k.zsh
sudo rm -rf -- ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
sudo sh ~/.oh-my-zsh/tools/uninstall.sh -y
sudo apt remove zsh -y
sudo apt autoremove -y
sudo rm -Rf ~/.zsh*
I’ve tried to replace most glyphs, which were prone to errors by emojis which should be rendered just fine by the Chrome OS terminal. Here’s the end result