Having installed the Windows Subsystem for Linux, you’re all ready to begin exploring Linux.
Before you dive into Linux though, take a moment to set up your Powershell console so your Linux development life is a little nicer.
Colourize your Powershell
Powershell’s default colour scheme is a bit on the nasty side so take a moment to customize your Windows Powershell scheme to use the Solarized colours.
Get rid of the annoying bell
Launching your newly Solarized Powershell, and entering the Windows Subsystem for Linux by typing
bash, you might find an annoying “bell” on certain keystrokes (for example hitting ‘backspace’ when you’ve not yet typed anything). Let’s fix that.
Change to your Linux home directory
If you’re a complete Linux neophyte, don’t worry, just follow along - to change to your home directory, make sure you’ve launched
bash from inside Powershell and then type
You should see your prompt change to something akin to
Open up your .bashrc
One of Linux’s key ideas is that everything is a file. All your configuration is done through plain text files. There’s no registry lurking somewhere, no MMC snapin, just simple file editing.
We’ll create a new file which will turn the bell off during our Linux sessions. To do this, we will redirect some text written to stdout into a file istead.
echo 'set bell-stlye none' >> .inputrc
echo is fairly standard - In bash,
echo will write text to stdout - in our case, the screen.
>> after our text redirects the output to a file name
.inputrc. This will create the file if it does not exist or append to it if it does. Be careful to use two angle brackets, if you use only one, you’ll overwrite the file if it already exists.
In Linux files prefixed with a
. are called dotfiles and are often used for configuration.
To exit from bash, simply type
exit and you will be returned to your standard Powershell console.
If you close Powershell and re-open it and type in
bash, you’ll drop into Linux again. This time though, you should be free from the bell!
A quick note about dotfiles
Dotfiles will not show up in a normal directory listing, so if you have created your
.inputrc file and wonder why it isn’t showing up when you type in
ls, try passing the
-a argument to list all files in like so: