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.
Important Linux Commands
1. pwd
Shows your current folder location.
pwd2. ls
Lists files and folders.
lsUse ls -l for details and ls -a for hidden files.
3. cd
Changes directory.
cd Documents4. mkdir
Creates a new folder.
mkdir myfolder5. rmdir
Deletes an empty folder.
rmdir myfolder6. touch
Creates a new empty file.
touch file.txt7. rm
Deletes files and folders permanently.
rm file.txtUse rm -r to delete folders.
8. cp
Copies files or folders.
cp file.txt backup.txt9. mv
Moves or renames files.
mv old.txt new.txt10. clear
Clears terminal screen.
clear11. cat
Displays file content.
cat file.txt12. echo
Prints text on screen or writes to files.
echo Hello Linux13. man
Shows manual/help for commands.
man ls14. whoami
Shows current logged-in username.
whoami15. date
Displays current date and time.
date16. uname
Shows system information.
uname -a17. history
Displays previously used commands.
history18. sudo
Runs commands as administrator.
sudo apt update19. apt update
Updates package list from repositories.
sudo apt update20. apt upgrade
Upgrades installed packages to latest versions.
sudo apt upgradeLinux Command Summary
| Command | Purpose |
|---|---|
| pwd | Show current folder |
| ls | List files |
| cd | Change directory |
| mkdir | Create folder |
| touch | Create file |
| rm | Delete file |
| cp | Copy file |
| mv | Move/Rename file |
| cat | View file content |
| sudo | Run as admin |
Why Learn Linux Commands?
Learning Linux commands helps in:
- System administration
- Programming
- Ethical hacking
- Cybersecurity
- Server management