Welcome to Linux Essential Commands!
Here you will learn 15 of the most useful commands in Linux, which you will practice in the next lesson!
Try to read over these and apply it in the Lab.
It is okay if you can't remember them all immediately :)
1. pwd
Shows the current directory you are in.
Think of it as asking Linux:
“Where am I right now?”
2. ls
Lists all the files and folders inside your current directory.
3. cd
Stands for Change Directory.
This simply means moving into another folder.
cd documents
You can also move back one folder using:
cd ..
4. mkdir
Stands for Make Directory.
This lets you create your own folder.
mkdir linux-practice
5. touch
Creates a new empty file.
touch notes.txt
6. cat
Reads and displays the contents of a file.
cat notes.txt
7. cp
Stands for Copy.
This lets you copy a file or folder.
cp notes.txt notes-copy.txt
8. mv
Stands for Move.
You can use this to move a file, but it can also be used to rename one.
mv notes.txt linux-notes.txt
9. rm
Stands for Remove.
This simply deletes a file.
rm notes.txt
You can remove a folder and everything inside it using:
rm -r folder-name
Be careful with this command, as Linux usually will not ask if you are sure.
10. grep
Lets you search for specific text inside a file.
You can think of it as filtering through information to find what you need.
grep "Linux" notes.txt
11. find
Searches for files and folders.
find . -name "notes.txt"
The . means to start searching from the directory you are currently in.
12. chmod
Stands for Change Mode.
This command changes the permissions of a file or folder.
For example, this allows a script to be run:
chmod +x script.sh
13. ps
Shows the processes currently running on the system.
A process is simply a program or task that Linux is running.
14. ps
You may also commonly see:
ps aux
This gives you more information about the running processes.
15. curl
Lets you send requests to websites and APIs from the terminal.
This is very useful in DevOps and Platform Engineering when checking whether a website or service is working.
curl https://example.com
Do not worry about remembering every command straight away
Even experienced engineers sometimes need to check how a command works. The important part is understanding what the command is used for and getting comfortable using it in the terminal.