NOTE: you probably don't want this guide, unless you're feeling particularly adventurous!
This is an optional guide for those interested in some advanced command line usage. Windows users probably want to install WSL first.
This section is for Windows users who want a full Linux experience.
NOTE: for 2025, I made this section entirely optional and not recommended (but all students in the previous 2 years did it). If you're on Linux or macOS, this section is irrelevant for you. If you're on Windows, you can do this step, but it's no longer required. It's possible, though, that we'll come back to it later in the year
We'll be installing a flavour of Linux called Ubuntu in a virtual machine (VM) within our host Windows operating system (OS). Having Linux running within Windows in this way is officially supported by Microsoft, and they've called it WSL (Windows Subsystem for Linux).
Install WSL, using your lower-case forename (eg 'jake' not 'Jake') as Linux user and putting in a password (you won't see the password, but press enter when done). You may have to restart before you can use it.
About 20% of students run into some kind of issue installing WSL. If you get some kind of error when following the above guide, here are some things which have worked for others in the past:
We now need to set up VSCode to use WSL correctly. This assumes you have VSCode installed already.
/home/jake showncode folder within here and go into itWith VSCode installed and open to your Linux VM, you'll now open the Linux command line within VSCode:
CTRL+' next to 'Terminal' in the menu, which is a keyboard shortcut to quickly open/close it in the futureYou'll find various config files in your home ~ folder - they tend to start with a .. Have a look at your .bashrc and your .profile file by opening them in VSCode with eg code ~/.profile. These files are run when you open a terminal and you can modify them to do things like add aliases and run scripts on startup.
NOTE: For me, Starship seems very slow on Windows, so probably best not to use it
winget install --id Starship.Starshipcode $PROFILE and add the line Invoke-Expression (&starship init powershell)Set-ExecutionPolicy -Scope CurrentUser RemoteSignedHead on over to https://starship.rs/ and follow the instructions to pimp your shell. In brief, in a terminal run curl -sS https://starship.rs/install.sh | sh.
Also add the following to the end of your .bashrc file eval "$(starship init bash)" then exit your shell and open a new one.
Make a file called $HOME/.config/starship.toml and put the following in it:
[time]
disabled = false
format = '[$time ]($style)'
[git_branch]
symbol = '^'
[nodejs]
detect_extensions = []
[bun]
detect_extensions = ['js', 'jsx', 'ts']
See the docs for other config tweaks you can make. There's also something about installing a nerd font, which I haven't got round to yet myself but will get rid of weird ? symbols in your shell.
NOTE: you can only do this on Windows if using WSL
You may want to try a different shell such as fish for eg more colours and some awesome auto completion. Install it with:
sudo apt-add-repository ppa:fish-shell/release-3
sudo apt update
sudo apt install fish
Run fish with fish then exit to get back out. Then get Starship working in fish by adding starship init fish | source to the bottom of ~/.config/fish/config.fish. Try running it again with fish and you'll see it has Starship in it now. Close/exit your terminal in VScode completely.
If you like it, in VSCode close/exit your terminal completely then open a new one and click the down arrow next to the '+' then 'Select default profile' and choose 'fish'. Close the terminal and open a new one and it should be fish instead of bash. If you change your mind later, switch the default profile back to 'bash'.
NOTE: you can only do this on Windows if using WSL
We can use cat in the terminal to show the contents of a file. But there's another command we can install called bat (or batcat) which looks nicer with syntax highlighting and line numbers.
Run sudo apt install bat to install bat as batcat, then add alias cat='batcat' to your ~/.config/fish/config.fish file to be able to run it as cat instead of batcat. Close and open a new terminal then try it out with eg cat ~/.config/fish/config.fish (then arrows to navigate up/down and q to exit).
Many uber-geeks use a CLI text editor instead of a GUI one such as VSCode. Popular choices are emacs and vim. If interested, best to find someone you know who's tried them before to get some tips.
The following are for Linux and WSL only:
sudo apt update is like the Linux equivalent of checking for Windows updatessudo it's like trying to run a Windows program as the administrator; on Linux, the administrator is called 'root'sudo apt upgrade actually installs the updates
htop is like the Task Manager on Windows, showing your CPU and memory usage and running tasks
htop with keyboard letter q, which stands for 'quit'uname -a shows you what version of Linux you're onls -lah shows files in the current folder, with a bit more information
-lah part of the command provides 3 'flags', which we'll learn about from...man ls shows the manual/guide for how to use ls
-lah do? That's 3 flags: l, a and hhtop, press q to quitls --help is another way to see usage info for the ls commandman [cmd]) or it's help ([cmd] --help), but not all commands have manuals or help pagessudo apt install [package] as brew install [package]brew install htop then run it with htop (exit with q)You may need to do some Windows updates before you can install WSL
You may have to reinstall WSL if you mess up the user account creation on first go
Oops! Thankfully it's easy to reset. Open a PowerShell in Windows then run wsl -u root, then passwd <username> (eg passwd jake if your Linux username is 'jake'), then enter a new password when prompted.
In Windows, open File Explorer then bottom-left click 'Linux', then navigate to eg /home/jake. The Linux files are stored within WSL's Linux installation VM, which Windows sees as a network file share. You may want to pin the folder to your favourites in File Explorer.