Join the AI Workshop to learn more about AI and how it can be applied to web development. Next cohort February 1st, 2026
The AI-first Web Development BOOTCAMP cohort starts February 24th, 2026. 10 weeks of intensive training and hands-on projects.
Let’s learn the fundamentals of using Bash and navigating the command line.
Navigating the Filesystem
To navigate through the filesystem you will use the ls command. It lists files in the current folder.
ls
You usually start from your home folder (on macOS it’s /Users/yourusername, on Linux it’s /home/yourusername).
To navigate to other folders you use the cd command:
cd Documents
cd .. goes back to the parent folder.
To know where you are, type pwd (pathname of working directory):
pwd
Command Line Editing
When typing commands, you can:
- Use left/right arrow keys to move the cursor
- Press backspace to correct mistakes
- Press enter to execute the command
Useful keyboard shortcuts:
ctrl+d- delete the currently selected characterctrl+f- go to the character on the rightctrl+b- go to the character on the leftctrl+a- go to the beginning of the linectrl+e- go to the end of the line
Autocompletion
Press the tab key to autocomplete file names and commands. Try typing cd Doc and press tab to autocomplete to cd Documents.
If there are multiple matches, Bash will show you the options. Type more characters to narrow down and press tab again.
Common Shell Commands
These are filesystem commands:
ls- list filescd- change folderrm- remove a file or foldermv- move a file or rename itcp- copy a filepwd- show the current working directorymkdir- create a folder
For working with files:
cat- display file contentstail- show the last lines of a filegrep- search for text in filesman- show the manual for a command
Editors:
nano- simple text editorvim- powerful text editor
Executing Commands
Commands in /bin and other standard locations can be run by name:
ls
pwd
To run an executable in your current folder, prefix it with ./:
./myscript
Or use the full path:
/Users/flavio/scripts/myscript
Command History
Press the up arrow key to navigate through previously entered commands. Press down to go forward in history.
Run the history command to see all commands you’ve entered:
history
Jobs and Processes
When running a long command, you can:
ctrl+C- kill the running commandctrl+Z- pause and send to background
Use these commands to manage jobs:
jobs- list background jobsfg- bring a job to foregroundbg- resume a paused job in backgroundps- list running processestop- show processes and resource usagekill <PID>- terminate a process