Linux Tutorial — Part 4: Basic Linux Commands

In this part, we will learn the most important Linux commands. These commands form the foundation of everything you do in Linux. Understanding them deeply is more important than memorizing them.

1. pwd — Print Working Directory

Shows your current location inside the Linux file system.

pwd

Use this command whenever you feel lost.

2. ls — List Files and Directories

Displays files and folders in the current directory.

ls

Common options:

ls -l
ls -a
ls -la

3. cd — Change Directory

Used to move between directories.

cd /home
cd ..
cd ~

4. mkdir — Create Directory

Creates new folders.

mkdir projects
mkdir linux/tutorials

5. rmdir — Remove Empty Directory

Deletes empty directories only.

rmdir old_folder

6. touch — Create Empty File

Creates a new empty file.

touch file.txt

7. cp — Copy Files and Directories

Copies files from one location to another.

cp file1.txt file2.txt
cp -r folder1 folder2

8. mv — Move or Rename Files

Moves files or renames them.

mv old.txt new.txt
mv file.txt /home/user/

9. rm — Remove Files

Deletes files permanently. Use carefully.

rm file.txt

Remove directories:

rm -r folder_name

⚠️ Important Warning

Linux does not have a recycle bin for terminal deletes. Once removed, files are gone.

How These Commands Work Together

Linux workflows are built by combining small commands. Each command does one job well.

Mastering these basics will make advanced topics easy later.

In the next part, we will learn how to view file contents and work with text inside Linux.

Next: Viewing & Reading Files →
Disclaimer:
Commands shown here can modify or delete files. Practice in a safe environment.