-
Notifications
You must be signed in to change notification settings - Fork 1
Tutorial 02
The shell is a program that takes commands from your keyboard and gives them to the operating system to perform. In the early days of computing, it was the only way to interact with Linux systems.
Today, while most systems offer graphical user interfaces (GUIs), Linux still relies heavily on the command line interface (CLI) — especially for programming, automation, and science.
On most Linux systems, the shell program is called Bash, which stands for Bourne Again SHell 🐚. It’s an improved version of the original Unix shell (sh), and it’s the most common shell used today.
⚠️ Pro tip: If you run a command by mistake or it’s taking too long, pressCtrl + Cto cancel it. This works in most terminal environments.
Commands are typed into the terminal and executed by pressing Enter.
In these tutorials, we’ll use a $ symbol to indicate a command you should type — but don’t include the $ when you copy-paste!
💡 If you installed Ubuntu from Tutorial 1, your prompt will look like:
$ Shows your current location in the filesystem.
$ pwd
/User/home/Lists all files and folders in the current directory.
$ ls
FolderA/ FolderB/ FolderC/ DocumentACreates a new folder.
$ mkdir EXAMPLE
$ ls
EXAMPLE/Changes your current working directory.
$ pwd
/User/home/
$ cd /User/home/EXAMPLE
$ pwd
/User/home/EXAMPLE
$ cd ../
$ pwd
/User/home/ 📌 Common cd shortcuts:
-
..= go up one directory -
-= go back to previous directory -
~= go to home directory -
/= root directory
Deletes files and directories.
- Remove a file:
$ rm filename- Remove a folder and everything in it:
$ rm -r directorynameCopies files or directories.
- Copy a file:
$ cp filename targetdirectory- Copy a directory and its contents:
$ cp -r directory targetdirectoryMoves or renames files and directories.
- Move a file or folder:
$ mv filenameOrDirectory targetdirectory- Rename a file:
$ mv filename newfilename- Rename a directory:
$ mv directoryname newdirectorynameSearches your system for files or folders.
Syntax:
find [where_to_start] [options] [what_to_find]Example — to search for the EXAMPLE folder starting from the current directory:
$ find . -name "EXAMPLE"📌 . means "start searching in the current directory".
You’ve now learned the basic commands used to navigate a computer using Bash! 🐧
This skill forms the foundation for scripting, automation, and working with remote servers.
➡️ Move on to Tutorial 3 to keep learning!