Top Linux Command Cheat Sheet

The Linux command line is a powerful tool for managing files and performing system tasks. Whether you’re just starting or you’re looking to refine your skills, this cheat sheet provides essential commands that you’ll need to operate Linux efficiently.

In this post, we’ll cover basic commands and file management essentials, each with simple examples to help you get the most out of your terminal.

These are the commands you’ll use most often. Memorizing them will give you a solid foundation for navigating and managing your Linux environment.

CommandDescriptionExample
*Wildcard symbol for variable length.*.txt (matches all .txt files)
?Wildcard symbol for a single character.Doc?.docx (matches Doc1.docx, DocA.docx, etc.)
lsList files and directories.ls
ls -lList files with detailed information (permissions, time/date).ls -l
ls -aList all files, including hidden files.ls -a
ls -tList files sorted by modification time.ls -t
cd YChange directory to Y.cd /etc
cd ..Move to the parent directory.cd ..
cdMove to the home directory.cd
pwdPrint the current working directory path.pwd
mkdir XCreate a new directory X.mkdir new_folder
mv A BMove or rename a file from A to B.mv file.txt new_location/
cp A BCopy a file from A to B.cp file1.txt folder/
cp -r Y ZRecursively copy directory Y to Z.cp -r folder1/ folder2/
rm XRemove file X permanently.rm file.txt
rm -r YRemove directory Y and its contents recursively.rm -r folder/
rm -f XForce remove file X without confirmation.rm -f file.txt
rm -rf YForce remove directory Y and its contents recursively.rm -rf folder/
rmdir YRemove an empty directory Y.rmdir empty_folder
open XOpen file X in its default program.open file.pdf
touch XCreate a new empty file X or update its timestamp.touch new_file.txt
cat XDisplay contents of file X.cat file.txt
cat -b XDisplay contents of file X with line numbers.cat -b file.txt
wc XDisplay word count of file X.wc file.txt
head XDisplay the first 10 lines of file X.head file.txt
head -n 4 XDisplay the first 4 lines of file X.head -n 4 file.txt
`ls *.chead -n 5`Display the first 5 .c files in the directory.
tail XDisplay the last 10 lines of file X.tail file.txt
tail -n +1 XDisplay all contents of file X.tail -n +1 file.txt
tail -f XDisplay the last 10 lines and follow changes to file X.tail -f file.txt
lessView file contents with navigation.less file.txt
ln -s A SCreate a symbolic link from A to link S.ln -s /path/to/file link_name
cmp A BCompare files A and B for identical content.cmp file1.txt file2.txt
diff A BCompare files A and B for differences.diff file1.txt file2.txt

Input/Output Redirection

Input/output redirection allows you to log program outputs and error messages, or manipulate the flow of input and output between commands and files. Here are the essential commands:

CommandDescriptionExample
echo TEXTDisplay a line of TEXT or the contents of a variable.echo "Hello, World!"
echo -e TEXTInterprets escape characters in TEXT (e.g., \n → new line, \b → backslash, \t → tab).echo -e "Hello\nWorld!"
echo -n TEXTOmits the trailing newline after TEXT.echo -n "Hello"
`cmd1cmd2`Pipe output of cmd1 to cmd2.
cmd > fileRedirect output of cmd to file. Overwrites pre-existing content of the file.ls > files_list.txt
cmd >& fileRedirect output of cmd to file, suppressing the output of cmd. Overwrites file content.ls >& files_list.txt
cmd > /dev/nullSuppress the output of cmd (output is discarded).ls > /dev/null
cmd >> fileAppend output of cmd to file (does not overwrite).echo "new data" >> data.txt
cmd < fileRead input for cmd from file.wc -l < data.txt
cmd << delimRead input for cmd from standard input until the delimiter delim is encountered.wc -l << EOF
> I like
> apples
> EOF
cmd <<< stringInput a text string to cmd.echo "Hello" <<< "world"
cmd 2> fooRedirect error messages of cmd to foo.ls non_existent_folder 2> error.log
cmd 2>> fooAppend error messages of cmd to foo.ls non_existent_folder 2>> error.log
cmd &> fileRedirect both output and error messages of cmd to file.ls /bin &> output_and_errors.txt
  • >: Redirects output, overwrites file.
  • >>: Redirects output, appends to file.
  • 2>: Redirects error output to a file.
  • 2>>: Appends error output to a file.
  • &>: Redirects both output and error to a file.
  • /dev/null: A special file that discards output (essentially silences a command).

Piping Commands:

bashCopyEditps aux | grep python3

This command lists all processes and then filters for python3.

Redirecting Output to a File:

bashCopyEditecho "Hello, Linux!" > greeting.txt

This will write "Hello, Linux!" to greeting.txt.

Redirecting Error Output to a File:

bashCopyEditls non_existent_file 2> error.log

If non_existent_file doesn’t exist, it will log the error to error.log.

These commands help you find specific files or filter through content. They are essential for navigating and manipulating large sets of data or files.

CommandDescriptionExample
grep patt /path/to/srcSearch for the text pattern patt in files located in /path/to/src. Commonly used with pipes.`ps aux
grep -r patt /path/to/srcRecursively search for the text pattern patt in /path/to/src and its subdirectories.grep -r "error" /var/log/
grep -v patt XReturn lines in X that do not match the specified pattern patt.grep -v "debug" log.txt
grep -l patt XDisplay the names of files that contain the text pattern patt.grep -l "TODO" *.txt
grep -i patt XPerform a case-insensitive search for the pattern patt in X.grep -i "linux" file.txt
findFind files in a directory structure based on specified conditions.find /home
find /path/to/src -name "*.sh"Find all files in /path/to/src matching the pattern "*.sh" in their file names.find /usr/bin -name "*.sh"
find /home -size +100MFind all files larger than 100MB in the /home directory.find /home -size +100M
locate nameFind files or directories by name using an index of all files on the system.locate "document.txt"
sort XSort lines of text in X either alphabetically or numerically.sort file.txt
  • grep: Searches through file content for patterns.
    • -r: Recursively search directories.
    • -v: Invert match (exclude the pattern).
    • -l: List filenames that match the pattern.
    • -i: Ignore case when searching.
  • find: Searches the filesystem for files based on criteria like name, size, or type.
  • locate: Uses a pre-built index to quickly locate files on the system.
  • sort: Orders lines in a file or input stream.
  1. Search for running Python processes: bashCopyEditps aux | grep python3
  2. Find all .sh files in a directory: bashCopyEditfind /usr/bin -name "*.sh"
  3. Find files larger than 100MB: bashCopyEditfind /home -size +100M
  4. Sort contents of a file alphabetically: bashCopyEditsort file.txt

Search for running Python processes:

bashCopyEditps aux | grep python3

Find all .sh files in a directory:

bashCopyEditfind /usr/bin -name "*.sh"

Find files larger than 100MB:

bashCopyEditfind /home -size +100M

Sort contents of a file alphabetically:

bashCopyEditsort file.txt

These commands are essential for creating, manipulating, and extracting compressed files (like .tar, .zip, .gz, .bz2). Archives help reduce the file size and organize files efficiently. Below is a breakdown of the most common archive-related commands.

CommandDescriptionExample
tarManipulate .tar archive files.tar
tar -vGet verbose output while manipulating .tar archives.tar -tvf archive.tar
tar -cf archive.tar YCreate a .tar archive named archive.tar containing Y.tar -cf archive.tar folder/
tar -xf archive.tarExtract the .tar archive named archive.tar.tar -xf archive.tar
tar -tf archive.tarList contents of the .tar archive named archive.tar.tar -tf archive.tar
tar -czf archive.tar.gz YCreate a gzip-compressed .tar archive named archive.tar.gz containing Y.tar -czf archive.tar.gz folder/
tar -xzf archive.tar.gzExtract the gzip-compressed .tar archive named archive.tar.gz.tar -xzf archive.tar.gz
tar -cjf archive.tar.bz2 YCreate a bzip2-compressed .tar archive named archive.tar.bz2 containing Y.tar -cjf archive.tar.bz2 folder/
tar -xjf archive.tar.bz2Extract the bzip2-compressed .tar archive named archive.tar.bz2.tar -xjf archive.tar.bz2
gzipManipulate .gz archives.gzip
gzip YCreate a gzip archive named Y.gz containing Y.gzip file.txt
gzip -l Y.gzList contents of the gzip archive Y.gz.gzip -l archive.gz
gzip -d Y.gzExtract Y.gz and recover the original file Y.gzip -d file.txt.gz
gunzip Y.gzExtract Y.gz and recover the original file Y.gunzip file.txt.gz
bzip2Manipulate .bz2 archives.bzip2
bzip2 YCreate a bzip2 archive named Y.bz2 containing Y.bzip2 file.txt
bzip2 -d Y.gzExtract .bz2 archive Y.gz and recover the original file Y.bzip2 -d archive.bz2
bunzip2 Y.gzExtract .bz2 archive Y.gz and recover the original file Y.bunzip2 archive.bz2
zip -r Z.zip YZip folder Y and its contents into the .zip archive Z.zip.zip -r archive.zip folder/
unzip Z.zipUnzip .zip archive Z.zip to the current directory.unzip archive.zip
unzip Z.zipList contents of .zip archive Z.zip.unzip -l archive.zip
  • .tar: Common format for combining multiple files into a single archive (not compressed).
  • .tar.gz (Gzip): Combines files into a .tar archive and compresses it using Gzip for smaller file sizes.
  • .tar.bz2 (Bzip2): Similar to .tar.gz but uses Bzip2 compression, which can sometimes achieve higher compression rates.
  • .gz: Gzip compressed files.
  • .bz2: Bzip2 compressed files.
  • .zip: A widely used format for archiving and compressing files (often seen in Windows).

Create a .tar Archive:

bashCopyEdittar -cf archive.tar folder/

This will create archive.tar containing everything in folder/.

Extract a .tar.gz Archive:

bashCopyEdittar -xzf archive.tar.gz

This will extract the contents of archive.tar.gz.

Zip a Folder:

bashCopyEditzip -r folder.zip folder/

This will compress the folder folder/ into a .zip archive.

Extract a .bz2 Archive:

bashCopyEdittar -xjf archive.tar.bz2

This will extract the contents of archive.tar.bz2.

These commands are used for connecting to remote systems and transferring files securely between local and remote devices. Whether you’re copying, synchronizing, or uploading/downloading files, these tools are essential for managing remote file systems.

CommandDescriptionExample
ssh user@accessConnect to a remote system access as user.ssh alice@192.168.1.10
ssh accessConnect to access as your local username.ssh pi@192.168.1.100
ssh -p port user@accessConnect to a remote system access as user on a specified port port.ssh -p 2222 alice@192.168.1.10
scp [user1@]host1:[path1] [user2@]host2:[path2]Securely copy files from host1 (and path1) to host2 (and path2) via SSH. Paths may be local or remote.scp alice@pi:/home/alice/file.txt bob@192.168.1.20:/home/bob/
scp -P port [user1@]host1:[path1] [user2@]host2:[path2]Securely copy files from host1 to host2 on a specific port port.scp -P 2222 alice@pi:/file.txt bob@arduino:/file2.txt
scp -r [user1@]host1:[path1] [user2@]host2:[path2]Recursively copy files and directories from host1 to host2.scp -r alice@pi:/home/alice/folder/ bob@arduino:/home/bob/
sftp [user@]accessSecurely connect to access as user using the Secure File Transfer Protocol (SFTP).sftp alice@192.168.1.100
sftp accessConnect to access using your local username via SFTP.sftp pi@192.168.1.100
sftp -P port user@accessConnect to access as user on a specific port port using SFTP.sftp -P 2222 alice@192.168.1.100
rsync -a [path1] [path2]Synchronize path1 to path2, preserving symbolic links, attributes, permissions, ownership, and other settings.rsync -a /local/folder/ user@remote:/remote/folder/
rsync -avz host1:[path1] [path2]Synchronize files from remote host host1 (at path1) to local path2, preserving settings and compressing data during transfer.rsync -avz pi:/home/pi/ file.txt
  • ssh: Securely connects to a remote machine over the network.
    • -p: Specifies the port to use when connecting to the remote system.
  • scp: Securely copies files between hosts over SSH.
    • -P: Specifies the port to use.
    • -r: Recursively copies directories.
  • sftp: Secure File Transfer Protocol for transferring files securely over SSH.
    • -P: Specifies the port to use when connecting.
  • rsync: Synchronizes files and directories between two locations, locally or remotely. It preserves attributes, and is capable of compressing the data during transfer.
    • -a: Archive mode, which preserves symbolic links, permissions, and timestamps.
    • -v: Verbose mode; shows detailed output of the transfer process.
    • -z: Compresses data during the transfer to save bandwidth.

Securely Copy a File from Local to Remote:

bashCopyEditscp file.txt user@192.168.1.10:/home/user/

This copies file.txt from the local system to /home/user/ on the remote system.

Synchronize a Directory Locally:

bashCopyEditrsync -avz /local/dir/ user@remote:/remote/dir/

This synchronizes the contents of /local/dir/ to /remote/dir/ on the remote system.

Use SFTP to Upload Files:

bashCopyEditsftp user@192.168.1.10

This opens an SFTP session with the remote system 192.168.1.10.

Recursively Copy Files Between Two Hosts:

bashCopyEditscp -r folder/ user@remote:/home/user/

This recursively copies the entire folder and its contents from the local machine to the remote system.

File permissions are crucial for security and functionality in Linux. They control who can read, write, or execute files. Here’s a guide to help you manage file permissions effectively.

CommandDescriptionExample
chmod permission fileChange the permissions of a file or directory. Permissions can be set using symbolic notation or octal numbers.chmod +x testfile (Allow execution)
chown user2 fileChange the owner of a file to user2.chown bob file.txt (Change owner to bob)
chgrp group2 fileChange the group of a file to group2.chgrp staff file.txt (Change group to staff)
  • u: user (owner)
  • g: group
  • o: other users
  • a: all users
  • r: read
  • w: write
  • x: execute
  • +: add permission
  • : remove permission
  • =: set exact permission
CommandDescriptionEffect
chmod +x testfileAllow all users to execute the file.Adds execute permission for all users.
chmod u-w testfileForbid the current user from writing to the file.Removes write permission for the user.
chmod u+wx,g-x,o=rx testfileAdd write and execute permissions to the user, remove execute permission from the group, and set permissions of others to read and execute.Modifies multiple permissions at once.

Linux permissions can also be expressed as a three-digit octal number. Here’s how they map to symbolic format:

OctalPermission(s)Equivalent to symbolic notation
0No permissions---
1Execute only--x
2Write only-w-
3Write and execute-wx
4Read onlyr--
5Read and executer-x
6Read and writerw-
7All permissionsrwx
CommandDescriptionEffect
chmod 777 testfileAllow all users to read, write, and execute the file.Gives full access to everyone.
chmod 177 testfileRestrict the current user to execute-only, while the group and other users have full access.User can execute, others have full access.
chmod 365 testfileUser can write and execute; group can read and write; others can read and execute.Fine-tuned permission set.

Give Execute Permission to a File:

bashCopyEditchmod +x testfile

This command allows all users to execute testfile.

Remove Write Permission for the User:

bashCopyEditchmod u-w testfile

The current user will no longer be able to modify testfile.

Set Read, Write, and Execute Permissions Using Numeric Values:

bashCopyEditchmod 755 testfile

This grants the user full permissions, while the group and others can read and execute the file.

Change Ownership of a File:

bashCopyEditchown bob testfile

Changes the owner of testfile to bob.

Change Group of a File:

bashCopyEditchgrp admin testfile

Changes the group of testfile to admin.

System information commands are essential when you’re developing applications or troubleshooting your Linux machine. These commands help you gather information about your system’s configuration, hardware, and storage usage.

CommandDescriptionExample
unameShow basic Linux system information.uname (Shows basic system info)
uname -aShow detailed Linux system information.uname -a (Displays full system details)
uname -rShow kernel release information (e.g., kernel version).uname -r (Displays kernel version)
uptimeShow how long the system has been running and the load information.uptime (Shows system uptime and load averages)
suSwitch to superuser (root). Used to execute commands as a root user.su (Switches to root)
sudoRun commands with superuser (root) privileges.sudo shutdown (Shutdown the system as root)
calShow the current calendar with the current date highlighted.cal (Displays the current month’s calendar)
dateShow the current date and time of the system.date (Displays the current date and time)
haltStop the system immediately.halt (Immediately shuts down the system)
shutdownShut down the system.shutdown (Shuts down the system)
rebootRestart the system.reboot (Restarts the system)
last rebootShow reboot history.last reboot (Displays history of system reboots)
man COMMANDShow the manual page for a given command.man ls (Displays the manual for the ls command)
hostnameShow the hostname of the system.hostname (Displays the system’s hostname)
hostname -IDisplay the IP address of the host.hostname -I (Displays the host’s IP address)
cat /etc/*-releaseShow the version of the installed Linux distribution.cat /etc/os-release (Displays OS version information)
CommandDescriptionExample
dmesgDisplay messages from the kernel ring buffer, such as boot and hardware messages.dmesg (Displays kernel log messages)
cat /proc/cpuinfoDisplay information about the CPU.cat /proc/cpuinfo (Shows CPU details)
cat /proc/meminfoDisplay information about system memory (RAM).cat /proc/meminfo (Shows memory details)
lspci -tvDisplay information about PCI devices, including peripherals.lspci -tv (Shows PCI device info as a tree)
lsusb -tvDisplay information about USB devices connected to the system.lsusb -tv (Shows USB device info as a tree)
dmidecodeDisplay detailed system hardware components, serial numbers, and BIOS version.dmidecode (Displays system hardware details)
hdparm -i /dev/sdaDisplay information about the disk /dev/sda.hdparm -i /dev/sda (Shows disk details)
hdparm -tT /dev/sdaPerform a read speed test on the disk /dev/sda.hdparm -tT /dev/sda (Shows disk speed performance)
badblocks -s /dev/sdaTest for unreadable blocks on the disk /dev/sda.badblocks -s /dev/sda (Scans for bad blocks)
CommandDescriptionExample
dfDisplay disk space usage of mounted filesystems.df (Displays disk usage of mounted filesystems)
duDisplay the size of files and directories.du (Shows file/folder sizes)
du -ahShow disk usage in human-readable format (e.g., KB, MB, GB).du -ah (Shows file/folder sizes in human-readable units)
du -shShow total disk usage of the current directory.du -sh (Displays total size of current directory)
du -hShow free and used space on mounted filesystems in human-readable format.du -h (Displays disk usage of all mounted filesystems)
du -iShow free and used inodes on mounted filesystems.du -i (Displays inode usage)
fdisk -lList the disk partitions, their sizes, and types.fdisk -l (Displays partition table details)
free -hDisplay free and used memory in human-readable units.free -h (Shows memory usage in human-readable format)
free -mDisplay free and used memory in MB.free -m (Shows memory usage in MB)
free -gDisplay free and used memory in GB.free -g (Shows memory usage in GB)
CommandDescriptionExample
&Run the command or process in the background.command & (Runs command in the background)
psShow process status. Often used with grep to filter results.`ps aux
ps -e or ps -AList all running processes.ps -e (Shows all processes)
ps -efDisplay a detailed overview of all processes.ps -ef (Shows full process list)
ps -U root -u rootDisplay all processes running under the root account.ps -U root -u root (Shows root’s processes)
ps -eo pid,user,commandDisplay only PID, user, and command columns in process output.ps -eo pid,user,command (Simplified process list)
topDisplay a real-time, sorted list of processes.top (Shows processes and system stats)
htopDisplay a more advanced, interactive, and sorted list of processes with visual highlights.htop (Interactive process viewer)
atopDisplay detailed information about processes and hardware.atop (Shows processes with hardware stats)
kill PIDTerminate a process by its process ID (PID).kill 1234 (Kills process with PID 1234)
killall proc1Kill all processes containing “proc1” in their name.killall python3 (Kills all Python3 processes)
lsofList all open files on the system.lsof (Lists open files and processes)
lsof -u rootList all open files by the root user.lsof -u root (Lists files opened by root)
mpstat 1Display CPU statistics, updated every 1 second.mpstat 1 (Displays processor stats)
vmstat 1Display virtual memory statistics updated every 1 second.vmstat 1 (Displays memory and system stats)
iostat 1Display system I/O statistics for devices and partitions, updated every second.iostat 1 (Shows I/O stats)
tail -n 100 /var/log/messagesDisplay the last 100 lines of system log messages.tail -n 100 /var/log/messages (Shows latest log entries)
tcpdump -i eth0Capture and display network packets on interface eth0.tcpdump -i eth0 (Captures all packets on eth0)
tcpdump -i eth0 port 80Monitor HTTP traffic (port 80) on the network interface eth0.tcpdump -i eth0 port 80 (Monitors HTTP packets)
watch df -hRun the df -h command periodically and display updated results.watch df -h (Shows disk usage every few seconds)
CommandDescriptionExample
whoDisplay who is logged into the system.who (Shows logged-in users)
wDisplay what users are online and what they are doing.w (Shows users and their activities)
usersList currently logged-in users.users (Shows logged-in users)
whoamiDisplay the current logged-in user.whoami (Shows current user)
idDisplay the user ID (UID) and group IDs (GID) of the current user.id (Displays UID and GID of the current user)
lastShow a list of users who have logged onto the system.last (Displays last logged-in users)
groupadd gp1Create a new group named gp1.groupadd gp1 (Creates a group called gp1)
useradd -c "Alice Bob" -m ab1Create a new user ab1 with the comment “Alice Bob” and a home directory.useradd -c "Alice Bob" -m ab1 (Creates user ab1)
userdel ab1Delete the user ab1.userdel ab1 (Deletes user ab1)
usermod -aG gp1 ab1Add user ab1 to the group gp1.usermod -aG gp1 ab1 (Adds ab1 to group gp1)
CommandDescriptionExample
ifconfigDisplay all network interfaces with IP addresses.ifconfig (Shows network interfaces and IPs)
ifconfig -aDisplay all network interfaces, including those that are down.ifconfig -a (Shows all interfaces, even if down)
ifconfig eth0Display IP and details of the eth0 network interface.ifconfig eth0 (Shows details of eth0 interface)
ip aAnother command to display all network interfaces with IP addresses.ip a (Shows interfaces and IPs)
ethtool eth0Query or control the settings of the eth0 network interface.ethtool eth0 (Shows settings for eth0)
netstatPrint network statistics, open sockets, routing tables, etc.netstat (Displays network connections)
netstat -aShow both listening and non-listening sockets.netstat -a (Displays all sockets)
netstat -lShow only listening sockets.netstat -l (Displays only listening sockets)
netstat -nutlpShow listening TCP and UDP ports, and the corresponding programs.netstat -nutlp (Displays listening ports and processes)
ping hostSend an ICMP echo request (ping) to a host (hostname, domain name, or IP address).ping google.com (Pings Google)
whois domainDisplay WHOIS information for a domain.whois example.com (Shows WHOIS data for example.com)
dig domainQuery DNS records for a domain.dig example.com (Shows DNS info for example.com)
dig -x addrPerform a reverse DNS lookup on an IP address.dig -x 8.8.8.8 (Performs reverse DNS lookup on Google’s DNS)
host domainDisplay the IP address associated with a domain.host example.com (Shows IP address for example.com)
wget LINKDownload a file from a URL.wget http://example.com/file.zip (Downloads file from URL)
curl LINKFetch and display the HTML source of a URL.curl http://example.com (Displays the webpage source)
Linux DistributionPackage File ExtensionPackage Installer(s)
Debian / Ubuntu.debapt, dpkg
Rocky / Fedora / Red Hat Enterprise Linux.rpmyum, dnf
Arch Linux / Manjaro / Garuda / Chakra.pkg, .pacman, .pkg.tar(.xz/.zst/.gz)pacman
Linux DistributionDebian / UbuntuRocky / Fedora / Red Hat Enterprise LinuxArch Linux / Manjaro / Garuda / Chakra
Update list of packages available from remote repositoriessudo apt updatednf check-updatepacman -Syy (Be cautious; use pacman -Syu instead)
Upgrade installed packagessudo apt upgradesudo dnf upgradepacman -Syu
Find a package with keyword in the nameapt search keyworddnf search keywordpacman -Ss keyword
View description and summary information about a packageapt show packagednf info packagepacman -Si package
Install a package (with appropriate file extension) on the local file systemsudo dpkg -i package.debsudo dnf install package.rpmpacman -S package
Remove / uninstall a packagesudo apt remove packagesudo dnf erase packagepacman -R package
  1. Debian/Ubuntu (apt):
    • To fix broken packages after installation: sudo apt --fix-broken install
    • To remove a package and its unused dependencies: sudo apt autoremove
  2. Rocky/Fedora/RHEL (dnf):
    • To check for package updates: dnf check-update
    • To remove orphaned dependencies (unused packages): dnf autoremove
  3. Arch Linux/Manjaro (pacman):
    • To clean the cache of downloaded packages (free up disk space): sudo pacman -Scc
    • To remove orphaned packages (dependencies no longer required): sudo pacman -Rns $(pacman -Qdtq)

Mastering these Linux commands will greatly improve your efficiency and productivity in the terminal. Start by practicing the basic commands, and as you grow more comfortable, explore more advanced options.

The Linux command line may seem intimidating at first, but with a little practice, you’ll soon be navigating and managing files like a pro. Happy learning!

LinkedIn
X
Facebook

Related Articles

Leave a Comment

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

Copyright © 2025 Yakubu Bello - Cyber Security Expert