Master Essential Linux Commands: From ls to cd in One Guide
This article provides a concise, beginner-friendly overview of 20 essential Linux commands—including file listing, disk inspection, checksum verification, disk imaging, system information, command history, privilege escalation, file management, package handling, archiving, calendar, date manipulation, and navigation—complete with clear explanations, usage tips, and example terminal outputs.
1. ls command
The ls command lists directory contents. Use ls for a simple list, ls -l for detailed view, and ls -a to include hidden files.
root@tecmint:~# ls
Android-Games Music
Pictures Public
Desktop Tecmint.com
Documents TecMint-Sync
Downloads Templates root@tecmint:~# ls -l
total 40588
drwxrwxr-x 2 ravisaive ravisaive 4096 May 8 01:06 Android-Games
...2. lsblk command
lsblk lists block devices in a tree format; lsblk -l shows a flat list.
root@tecmint:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 232.9G 0 disk
├─sda1 8:1 0 46.6G 0 part /
...3. md5sum command
md5sum calculates and verifies an MD5 hash to check file integrity.
root@tecmint:~# md5sum teamviewer_linux.deb
47790ed345a7b7970fc1f2ac50c97002 teamviewer_linux.deb4. dd command
dd copies and converts files, commonly used to write ISO images to USB devices.
root@tecmint:~# dd if=/home/user/Downloads/debian.iso of=/dev/sdb1 bs=512M; sync5. uname command
uname displays system information; uname -a shows all details.
root@tecmint:~# uname -a
Linux tecmint 3.8.0-19-generic #30-Ubuntu SMP Wed May 1 16:36:13 UTC 2013 i686 i686 i686 GNU/Linux6. history command
history prints the command history. Press Ctrl+R to search previous commands.
root@tecmint:~# history 1 sudo add-apt-repository ppa:tualatrix/ppa 2 sudo apt-get update ...7. sudo command
sudo (super user do) allows authorized users to run commands as root or another user, offering a safer alternative to su.
“To err is human, but to really foul up everything, you need root password.”
8. mkdir command
mkdir creates a new directory; it fails if the directory already exists.
root@tecmint:~# mkdir tecmint9. touch command
touch updates a file's access and modification timestamps or creates an empty file if it does not exist.
root@tecmint:~# touch tecmintfile10. chmod command
chmod changes file permission bits. Permissions are expressed as read (4), write (2), and execute (1) for owner, group, and others.
root@tecmint:~# chmod 777 abc.sh11. chown command
chown changes file ownership to a specified user and group.
root@tecmint:~# chown server:server Binary12. apt command
apt (Advanced Package Tool) manages packages on Debian‑based systems. apt-get install installs packages, apt-get update refreshes the package list, and apt-cache searches.
root@tecmint:~# apt-get install mplayer
Reading package lists... Done
...13. tar command
tar creates and extracts archive files. Use -z for gzip, -j for bzip2.
root@tecmint:~# tar -zxvf abc.tar.gz14. cal command
cal displays a calendar for a given month and year.
root@tecmint:~# cal
May 2013
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
...15. date command
date prints or sets the system date and time.
root@tecmint:~# date
Fri May 17 14:13:29 IST 201316. cat command
cat concatenates and displays file contents. Use >> to append and > to overwrite.
root@tecmint:~# cat a.txt b.txt c.txt d.txt abcd.txt17. cp command
cp copies files or directories; it supports wildcards.
root@tecmint:~# cp /home/user/Downloads abc.tar.gz /home/user/Desktop18. mv command
mv moves or renames files and directories; use with care.
root@tecmint:~# mv /home/user/Downloads abc.tar.gz /home/user/Desktop19. pwd command
pwd prints the current working directory.
root@tecmint:~# pwd
/home/user/Desktop20. cd command
cd changes the current directory. cd ~ goes to the home directory, and cd .. moves to the parent directory. root@tecmint:~# cd /home/user/Desktop This collection of commands equips Linux newcomers with the fundamental tools needed for everyday system navigation, file manipulation, package management, and basic scripting.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
ITFLY8 Architecture Home
ITFLY8 Architecture Home - focused on architecture knowledge sharing and exchange, covering project management and product design. Includes large-scale distributed website architecture (high performance, high availability, caching, message queues...), design patterns, architecture patterns, big data, project management (SCRUM, PMP, Prince2), product design, and more.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
