🐧Linux/Unix: Introduction & Fundamentals
Estimated reading: 4 minutes 28 views

🧰 Complete Linux/Unix Commands List & Basic Utilities – Cheat Sheet for Beginners

🧲 Introduction – Why Master Linux/Unix Commands?

At the heart of Linux/Unix is the command line. Whether you’re managing servers, automating scripts, or navigating the file system, knowing the right commands makes you faster and more powerful. These basic utilities are the essential building blocks of everything from system administration to development.

🎯 In this guide, you’ll learn:

  • Frequently used Linux/Unix commands and their syntax
  • Basic file, directory, and system management tools
  • Real examples with practical output
  • Categories of commands: navigation, file handling, text processing, system info

πŸ“‚ File and Directory Management Commands

CommandDescription
pwdPrint current working directory
lsList files and directories
cdChange directory
mkdirCreate new directory
rmdirRemove empty directory
touchCreate a new empty file
rmDelete files or directories
cpCopy files or directories
mvMove or rename files

πŸ§ͺ Example:

mkdir test
cd test
touch file.txt
ls -l

πŸ“„ File Viewing and Content Commands

CommandDescription
catView file content
moreView file page-by-page
lessScrollable file viewer
headShow beginning of a file
tailShow last lines of a file
wcWord, line, and character count
nlNumber lines while displaying content

πŸ§ͺ Example:

cat myfile.txt
head -n 5 myfile.txt
wc myfile.txt

βœ‚οΈ Text Processing Utilities

CommandDescription
grepSearch for patterns in text
cutRemove selected columns/fields
awkPattern scanning and processing
sedStream editing (find/replace)
sortSort lines of text files
uniqFilter duplicate lines
trTranslate or delete characters
diffCompare two files
cmpCompare files byte by byte

πŸ§ͺ Example:

grep "error" logs.txt
awk '{print $1}' data.csv
sort names.txt | uniq

πŸ–₯️ System Information Commands

CommandDescription
dateShow current date and time
calDisplay calendar
uptimeShow how long system has been running
whoamiShow current user
idShow UID, GID, and groups
hostnameShow system hostname
uname -aDisplay system information
df -hDisk space usage
free -mShow memory usage in MB

πŸ§ͺ Example:

date
uname -a
df -h

πŸ”„ File Permissions and Ownership

CommandDescription
chmodChange file permissions
chownChange file ownership
chgrpChange group ownership
umaskSet default permission mask
statShow file metadata

πŸ§ͺ Example:

chmod 755 script.sh
chown user:group script.sh

πŸ”§ Process and Job Control

CommandDescription
psList current processes
topReal-time process viewer
killSend signal to process
jobsShow background jobs
bg/fgResume background/foreground jobs
niceSet process priority
killallKill all processes by name

πŸ§ͺ Example:

ps aux
kill 1234
top

πŸ“¦ Archive and Compression Utilities

CommandDescription
tarArchive files
gzipCompress files
gunzipDecompress .gz files
zipCreate ZIP files
unzipExtract ZIP files

πŸ§ͺ Example:

tar -czf archive.tar.gz myfolder/
unzip myfile.zip

🌐 Network Utilities

CommandDescription
pingCheck network connectivity
ifconfigView network interfaces (deprecated for ip)
ip addrShow IP addresses
netstatView network connections
ssReplacement for netstat
curlTransfer data from/to a server
wgetDownload files from the internet
host / digDNS lookup

πŸ§ͺ Example:

ping google.com
curl ifconfig.me
ip addr

πŸ”Ž Search Commands

CommandDescription
findSearch for files and directories
locateFind files quickly using a database
whichShow path of a command
typeShow if a command is built-in or external
whereisLocate source, binary, and man page of command

πŸ§ͺ Example:

find /etc -name "*.conf"
which bash

πŸ› οΈ Miscellaneous Utilities

CommandDescription
echoPrint text to terminal
historyShow command history
aliasCreate shortcut commands
clearClear the terminal screen
manManual pages for commands
helpShow help for built-in commands

πŸ§ͺ Example:

alias ll='ls -alF'
history | grep ssh
man tar

πŸ“Œ Summary – Recap & Next Steps

πŸ” Key Takeaways:

  • Linux/Unix provides a wide range of command-line utilities for working with files, processes, networks, and text.
  • Each command has options (-l, -h, --help) to customize behavior.
  • You can combine commands using pipes (|) and redirection (>, <, >>) for powerful workflows.

βš™οΈ Mastering these utilities is your gateway to automation, scripting, and professional system administration.

Next: Explore Linux Built-in Functions & System Calls like printf(), fork(), and open().


❓ FAQs

❓ How can I learn all Linux commands?
βœ… Start with frequently used commands (ls, cd, grep) and use man <command> to explore more.

❓ What is the difference between cat, less, and more?
βœ… cat prints full content; less and more let you scroll page-by-page. less is more advanced and preferred.

❓ How do I find the path of a command in Linux?
βœ… Use which <command> or type <command>.

❓ How can I count the number of lines in a file?
βœ… Use:

wc -l filename.txt

❓ How do I search text inside files?
βœ… Use:

grep "pattern" filename.txt

Share Now :

Leave a Reply

Your email address will not be published. Required fields are marked *

Share

πŸ”΅ Linux/Unix: Complete Commands List / Basic Utilities

Or Copy Link

CONTENTS
Scroll to Top