100 Plus Essential Linux Commands for Every User
Normal Linux user knows almost all the basic Linux day-to-day use commands to perform basic task such as installing any application, copying files from one directory to another, etc. But in this article I’m going to list 100 essential Linux commands which can be useful for every Linux user right from the noobs to the professional Linux developers and system administrators. So before wasting any time let’s get started with this huge list of essential Linux commands.
1. Cat (Concatenate)
This command can be used to get the contents of the file as an output in the Terminal window. You just need to write the cat command as shown sample screenshot and execute it.
As the name suggests this command can be used to create, view and concatenate files.
If the file is longer than the size of Terminal window then it will be not easy to read or view all the content of the file easily. But there is a tweak, you can use less with cat command. It will give user an ability to scroll forward and backward through the content of the files using PgUp and PgDn keys or Up and Down Arrow keys on the keyboard.
Finally to quit from the less you can just type in q.
aptitude is highly powerful interface for Linux package management system.
First of all you need to install or update aptitude package in your system using following command.
Once the installation is complete you can type aptitude in Terminal and execute it, this will open up aptitude interface as you can see in screenshot below.
You can use this aptitude built-in interface to update, install or remove any application package on Linux or its other distributions.
You can use cal command in Terminal window to see the calendar, as you can see in the following screenshot I have executed command to view the calendar of the current month and you can notice it highlighted the date as well.
You can also view the calendar of an entire year by executing command shown in following screen shot.
bc is another cool and useful command for Linux users as it allows you to enable command line calculator in Linux Terminal when you execude following command.
You can make any calculation in Terminal window itself, isn’t that cool command to have at your service?
The Linux command chage is an acronym for change age and it can be used to change the expiry information of the user’s password.
As you can see in the above screenshot you can also force the user to change the password after certain period of time i.e. periodically. This is an excellent command for system administrators.
You can get all the information of your file system just by executing df command in the Terminal window.
If you use df –h it will display file system information in human readable format as you can notice in following screenshot.
When you execute this help command in Terminal window, it will list all built-in commands you can use in shell.
8. pwd (Print Work Directory)
As the name Print Work Directory suggests, this command the path of the directory currently you’re working in. This command is very useful for all the Linux noobs and those who are new to Linux Terminal.
I think I don’t need to introduce to this command as this is one of the commonly used commands in Terminal by Linux users.
When you type and execute ls command in Terminal, it will show you all the contents of the particular directory i.e. both files as well as directories as you can see in above screenshot.
Linux Commands frequently used by Linux Sysadmins
Linux Commands frequently used by Linux Sysadmins – Part 1:
ip – from Iproute2, a collection of utilities for controlling TCP/IP networking and traffic control in Linux.
ls – list directory contents.
df – display disk space usage.
du – estimate file space usage.
free – display memory usage.
scp – securely Copy Files Using SCP, with examples.
find – locates files based on some user-specified criteria.
ncdu – a disk utility for Unix systems.
pstree – display a tree of processes.
last – show a listing of last logged-in users.
w – show a list of currently logged-in user sessions.
grep – Search a file for a pattern of characters, then display all matching lines.
Linux Commands frequently used by Linux Sysadmins – Part 2:
uptime – shows system uptime and load average.
top – shows an overall system view.
vmstat – shows system memory, processes, interrupts, paging, block I/O, and CPU info.
htop – interactive process viewer and manager.
dstat – view processes, memory, paging, I/O, CPU, etc., in real-time. All-in-one for vmstat, iostat, netstat, and ifstat.
iftop – network traffic viewer.
nethogs – network traffic analyzer.
iotop – interactive I/O viewer. Get an overview of storage r/w activity.
iostat – for storage I/O statistics.
netstat – for network statistics.
ss – utility to investigate sockets.
atop – For Linux server performance analysis.
nmon – htop and top Alternatives:
ssh – secure command-line access to remote Linux systems.
sudo – execute commands with administrative privilege.
cd – directory navigation.
pwd – shows your current directory location.
cp – copying files and folders.
mv – moving files and folders.
rm – removing files and folders.
mkdir – create or make new directories.
touch – used to update the access date and modification date of a computer file or directory.
man – for reading system reference manuals.
apropos – Search man page names and descriptions.
Linux Commands frequently used by Linux Sysadmins – Part 3:
rsync – remote file transfers and syncing.
tar – an archiving utility.
gzip – file compression and decompression.
b2zip – similar to gzip. It uses a different compression algorithm.
zip – for packaging and compressing (to archive) files.
locate – search files in Linux.
ps – information about the currently running processes.
44. Making use of Bash scripts. Example:
cron – set up scheduled tasks to run.
nmcli – network management.
ping – send ICMP ECHO_REQUEST to network hosts.
traceroute – check the route packets take to a specified host.
mtr – network diagnostic tool.
nslookup – query Internet name servers (NS) interactively.
host – perform DNS lookups in Linux.
dig – DNS lookup utility.
Linux Commands frequently used by Linux Sysadmins – Part 4:
wget – retrieve files over HTTP, HTTPS, FTP, and FTPS.
curl – transferring data using various network protocols. (supports more protocols than wget)
dd – convert and copy files.
fdisk – manipulate the disk partition table.
parted – for creating and manipulating partition tables.
blkid – command-line utility to locate/print block device attributes.
mkfs – build a Linux file system.
fsck – tool for checking the consistency of a file system.
whois – client for the whois directory service.
nc – command-line networking utility. (Also, see 60 Linux Networking commands and scripts.)
umask – set file mode creation mask.
chmod – change the access permissions of file system objects.
chown – change file owner and group.
chroot – run command or interactive shell with a special root directory.
useradd – create a new user or update default new user information.
userdel – used to delete a user account and all related files.
usermod – used to modify or change any attributes of an existing user account.
Linux Commands frequently used by Linux Sysadmins – Part 5:
vi – text editor.
cat – display file contents.
tac – output file contents, in reverse.
more – display file contents one screen/page at a time.
less – similar to the more command with additional features.
tail – used to display the tail end of a text file or piped data.
dmesg – prints the message buffer of the kernel ring.
journalctl – query the systemd journal.
kill – terminate a process.
killall – Sends a kill signal to all instances of a process by name.
sleep – suspends program execution for a specified time.
wait – Suspend script execution until all jobs running in the background have been terminated.
nohup – Run Commands in the Background.
screen – hold a session open on a remote server. (also a full-screen window manager)
tmux – a terminal multiplexer.
passwd – change a user’s password.
umount – provides access to an entire filesystem in one directory.
systemctl – Managing Services (Daemons).
clear – clears the screen of the terminal.
env -Run a command in a modified environment.
cheat – allows you to create and view interactive cheatsheets on the command-line.”
tldr – Collaborative cheatsheets for console commands.
bashtop – the ‘cool’ top alternative.
bpytop – Python port of bashtop.
btop – C++ version and continuation of bashtop and bpytop.
nload – a super simple, command-line network interface monitoring tool.