Instructor: Brent McPherson, Alyssa Dai
Outline
To follow most of the other modules, you will have to have some basic understanding of the command line. In this module we’ll take a look at the the BourneAgainSHell (BASH), the default command line in most Linux systems.
You will learn how to:
- move around on your computer with the command line, create and open directories and files
- find things with the command line (files and programs, PATH variables)
- run useful command line programs and find help (
find
,grep
,ls
, andman
/ documentation)
Questions you will be able to answer after taking this module
-
What is a command line shell?
-
How would you copy thousands of files with file names starting with
"my_good_file..."
to a different directory on your computer? -
Among thousands of files and directories you know there is one where you wrote down
"location of my thesis backup"
. How do you find this file? -
What is an environment variable, and how can you change it?
Material
Pre-recorded lecture video
Extras
- bash cheatsheet
- explainshell: write down a command-line to see the help text that matches each argument
- list of resources for learning bash
“Easy” way to make your terminal “prettier”
If you feel you do not want to spend time working in the terminal because “it looks ugly”, (the Mac’s terminal being one the worst offenders), here are a few tips.
-
check how to change the look and feel of it by editing the preferences
See for example for Macs terminal’s below.
More “advanced” solutions usually include installing tools that will help you personalize your terminal experience.
-
starship will work with most shells and operating systems and offers plenty of options in terms of looks and prompt configuration.
-
oh-my-zsh specializes with the zsh (the default shell on most Mac), and offers many themes for your prompt but also many plugins with many aliases to help you be more productive.
-
oh-my-posh will work with most shells and operating systems and offers a wide range of themes for your prompt.