Better WSL terminal
In your search of a Linux terminal on Windows you might have stumbled across projects such as cmder and WSL. There are many more projects like those. Personally for me this was the only configuration (in this post) that ended my search for a better terminal on a Windows PC.
Below steps are for impatient humans ( me included :p )
Better WSL terminal, steps
- Install VcXsrv on windows host
- Install WSL from windows store
- Inside WSL (bash), run
sudo apt update sudo apt install terminator npm nodejs-legacy sudo npm install --global base16-builder mkdir -p ~/.config/terminator base16-builder -s solarized -t terminator -b dark > ~/.config/terminator/config wget -O ~/.dir_colors https://raw.githubusercontent.com/seebi/dircolors-solarized/master/dircolors.256dark
- To test, launch terminator from bash.exe
$ DISPLAY=:0 terminator
- Setup terminator to load .bashrc
Right click on the terminator window and select preferences. On profiles tab, tick check Run command as login shell. This will enable terminator to read the rc files on startup - Edit ~/.bash_profile to contain
if [[ -f ~/.bashrc ]] ; then . ~/.bashrc fi if [ -f ~/.dir_colors ]; then eval `dircolors ~/.dir_colors` fi PS1="\[\e[1;4m\]WIN\[\e[m\] \[\e[36m\]\u\[\e[m\]@\[\e[32m\]\h:\[\e[33;1m\]\w\[\e[m\]$ "
- Create a shortcut to load terminator directly
Create a vbs file – terminator.vbs (Example location – C:\apps\appLinks\terminator.vbs)
args = “-c” & ” -l ” & “””DISPLAY=:0 terminator”””
WScript.CreateObject(“Shell.Application”).ShellExecute “bash”, args, “”, “open”, 0Finally create shortcut for VBS, with below properties
Target: C:\Windows\System32\wscript.exe C:\apps\appLinks\terminator.vbs
Start In: %USERPROFILE%
For a longer version do read this blog – https://blog.ropnop.com/configuring-a-pretty-and-usable-terminal-emulator-for-wsl/
It is a very inspiring blogpost.
HTH
References