✍️

Linux Basic Commands for Beginners | Complete Linux Guide

Linux Basic Commands for Beginners

Learn essential Linux commands with easy explanations and examples.

What are Linux Commands?

Linux commands are instructions typed in the terminal to interact with the operating system.

The terminal allows users to manage files, install software, and control Linux using text commands.

Important Linux Commands

1. pwd

Shows your current folder location.

pwd

2. ls

Lists files and folders.

ls

Use ls -l for details and ls -a for hidden files.

3. cd

Changes directory.

cd Documents

4. mkdir

Creates a new folder.

mkdir myfolder

5. rmdir

Deletes an empty folder.

rmdir myfolder

6. touch

Creates a new empty file.

touch file.txt

7. rm

Deletes files and folders permanently.

rm file.txt

Use rm -r to delete folders.

8. cp

Copies files or folders.

cp file.txt backup.txt

9. mv

Moves or renames files.

mv old.txt new.txt

10. clear

Clears terminal screen.

clear

11. cat

Displays file content.

cat file.txt

12. echo

Prints text on screen or writes to files.

echo Hello Linux

13. man

Shows manual/help for commands.

man ls

14. whoami

Shows current logged-in username.

whoami

15. date

Displays current date and time.

date

16. uname

Shows system information.

uname -a

17. history

Displays previously used commands.

history

18. sudo

Runs commands as administrator.

sudo apt update

19. apt update

Updates package list from repositories.

sudo apt update

20. apt upgrade

Upgrades installed packages to latest versions.

sudo apt upgrade

Linux Command Summary

CommandPurpose
pwdShow current folder
lsList files
cdChange directory
mkdirCreate folder
touchCreate file
rmDelete file
cpCopy file
mvMove/Rename file
catView file content
sudoRun as admin

Why Learn Linux Commands?

Learning Linux commands helps in:

  • System administration
  • Programming
  • Ethical hacking
  • Cybersecurity
  • Server management
Mastering Linux commands is the first step to becoming comfortable with Linux.
❮ Previous Next ❯