Bytes of Awareness

Linux

Essential Linux Commands for Beginners

A practical introduction to the Linux commands you'll use again and again while working in the terminal.


1. pwd — Where am I?

The pwd command shows your current working directory.

pwd

2. ls — What’s here?

Use ls to see the files and directories in your current location.

ls

For a detailed listing, use:

ls -la

3. cd — Move between directories

The cd command changes your current directory.

cd projects

To move back to the parent directory:

cd ..

4. mkdir — Create a directory

Use mkdir to create a new directory.

mkdir my-project

5. touch — Create a file

The touch command can create an empty file.

touch notes.txt

6. cat — Read a file

Use cat to display the contents of a text file.

cat notes.txt

7. cp — Copy files

Use cp to copy a file.

cp notes.txt backup.txt

8. mv — Move or rename

The mv command can move a file or rename it.

mv notes.txt linux-notes.txt

9. rm — Remove a file

Use rm to remove a file.

rm linux-notes.txt

Be careful with rm. Deleted files generally do not go to a recycle bin.

What’s next?

These commands are the foundation for working comfortably in a Linux terminal. The next tutorials can build on them with permissions, processes, packages, Git, SSH, and shell scripting.