linux commands you should know

Linux commnds

In this massive list of approximately 100 Linux commands, I have tried to include some of the most useful commands, Keyboard Shortcuts and Tools which every Linux user must know. Some of the Linux commands in this list are very basic which are used very frequently and also there are commands and tools which are not often used despite their great features.

These Linux commands also asked by the interviewer in an interview. If you are just starting to learn Linux then you should know all of these basic Linux commands.

 

access

The access command checks real user’s permissions for a file.

accton

This command is used to turn on or turn off the process for accounting or change info process accounting file. When this command is called without arguments, which is the default, it stops process accounting.

acpi

This command is used to display the battery status and other ACPI information.

adduser

The adduser command is used to add a user to the system respectively according to the default configuration specified in /etc/adduser.conf file.

addgroup

The addgroup command is used to add a group to the system respectively according to the default configuration specified in /etc/adduser.conf file.

agetty

The agetty command is a program that manages physical or virtual terminals and is invoked by init. Once it detects a connection, it opens a tty port, asks for a user’s login name and calls up the /bin/login command.  The agetty command is a substitute for Linux getty.

alias

The alias is a useful shell built-in command for creating aliases (shortcut) to a Linux command on a system.

apt

The apt tool is a relatively new higher-level package manager for Debian/Ubuntu systems.

apt-get

The apt-get command is a powerful and free front-end package manager for Debian/Ubuntu systems. It is used to install new software packages, remove available software packages, upgrade existing software packages as well as upgrade the entire operating system.

aptitude

The aptitude command is a powerful text-based interface to the Debian GNU/Linux package management system. Like apt-get and apt; it can be used to install, remove or upgrade software packages on a system.

arch

This command is used to print computer architecture.

arp

The arp command allows you to display and modify the ARP (Address Resolution Protocol) cache. An ARP cache is a simple mapping of IP addresses to MAC addresses.

aspell

This command is used as a spell checker in Linux.

at

The at command is used to schedule tasks to run in a future time.

atq

The atq command displays the list of pending jobs which are scheduled by the user.

atrm

The atrm command is used to remove the specified jobs. To remove a job, its job number is passed in the command.

awk

The awk is a powerful scripting programming language created for text processing and generally used as data extraction and reporting tool.

batch

The batch command is also used to schedule tasks to run a future time, similar to the at command.

basename

It strips directory information and suffixes from file names i.e. it prints the file name NAME with any leading directory components removed.

bc

This command is used for the command-line calculator.

bg

This command is used to place foreground jobs in the background.

bzip2

The bzip2 command is used to compress or decompress the file(s).

bzgrep

The bzgrep command is used to search a pattern or an expression inside a bzip2-compressed file

cal

This command is used to see the calendar of a specific month or a whole year. By default, it shows the current month’s calendar as output

cat

The cat command is used to view contents of a file or concatenate files, or data provided on standard input, and display it on the standard output.

cd

It is used to change the current working directory.

cfdisk

This command displays or manipulates the disk partition table by providing a text-based “graphical” interface.

chgrp

This command is used to change the group ownership of a file. Provide the new group name as its first argument and the name of the file as the second argument.

chage

The chage command is used to view and change the user password expiry information.

chpasswd

This command is used to change the password for multiple users at a time.

cp

This command is used to copy files through the command line.

chown

The chown command changes/updates the user and group ownership of a file/directory.

cksum

This command is used to display the CRC checksum and byte count of an input file.

clear

The clear command clears the terminal screen,

cmp

The cmp command performs a byte-by-byte comparison of two files.

comm

The comm command is used to compare two sorted files line-by-line.

curl

The curl command is a tool to transfer data to or from a server, using any of the supported protocols.

date

The date command is used to displays or sets the system date and time.

dd

This command is used for copying files, converting and formatting according to flags provided on the command line.

df

The df command shows the size, used space, and available space on the mounted filesystems of your computer.

diff

The diff command compares two text files and shows the differences between them.

diff3

this command is used to compare the three files line by line

dir

The dir command works ls command, it lists the contents of a directory.

dmidecode

A dmidecode command is a tool for retrieving hardware information of any Linux system

du

The du command is used to track the files and directories which are consuming an excessive amount of space on hard disk drive

echo

The echo command is used to display the line of text/string that is passed as an argument. This is a built-in command that is mostly used in shell scripts and batch files to output status text to the screen or a file.

eject

The eject command is used to eject removable media such as DVD/CD ROM or floppy disk from the system.

exec

The exec command is used to execute a command from the bash itself.

exit

The exit command will close a terminal window, end the execution of a shell script, or log you out of an SSH remote access session.

find

The find command is used to track down files and directory.

free

The free command shows the summary of system memory usage (free, used, swapped, cached, etc.).

grep

The grep command searches for a specified pattern in a file (or files) and displays all lines that contain that pattern.

groups

The groups command displays all the names of groups from a user belong.

gzip

The gzip command compresses files.

gunzip

The gunzip command restores the files compressed with gzip command.

head

The head command print N number of line, where N given input. By default, it prints the first 10 lines of a file.

history

This command is used to show previously used commands or to get info about command executed by a user.

hostname

This command is used to print or set the system hostname in Linux.

hostnamectl

hostnamectl command is part of the systemd and provides a proper API for dealing with setting a server’s hostnames in a standardized way.

hwclock

This command is a tool for managing the system hardware clock (Read or Set the hardware clock (RTC)).

htop

It is a command-line utility that allows the user to interactively monitor the system’s vital resources or server processes in real-time.

hwinfo

This command is used to probe for the hardware present in a Linux system.

ifconfig

The ifconfig command is used to configure Linux systems network interfaces.

iostat

The iostat command is used to show CPU and input/output statistics for devices and partitions.

ip

The ip command is used to display or manage routing, devices, policy routing, and tunnels. It also works as a replacement for well known ifconfig command. This command will assign an IP address to a specific interface.

iptables

The iptables command is a terminal-based firewall for managing incoming and outgoing traffic via a set of configurable table rules.

kill

The kill command allows you to terminate a process from the command line.

killall

killall command is used to kill a process by its name.

kmod

kmod command is used to manage Linux kernel modules. To list all currently loaded modules, type.

ls

This command is used to view the contents of a directory. It works more or less like dir command.

last

The last command displays a list of last logged in users.

ln

The ln command is used to create a soft link between files using the -s flag.

locate

The locate command is used to find a file by name.

login

The login command is used to create a new session with the system.

mkdir

The mkdir command allows you to create new directories in the filesystem.

mv

The mv command allows you to move files and directories from directory to directory. It also allows you to rename files.

passwd

This command is used to change the user password.

ping

This command is used to verify network connectivity.

ps

The ps command is used to lists running processes.

pwd

It is the command used for prints the path of the current working directory, starting from the root.

rm

This command is used to delete files and directories.

shutdown

The shutdown command lets you shut down or reboot your Linux system.

sudo

touch

The touch command is used to create a file. It can be anything, from an empty .txt file to an empty .zip file.

 

If you want to add another Linux commands in this list, then your welcome. I will publish the mentioned Linux commands with your name. If you have any other suggestions for this Linux commands list, then please write in the comment box either you can directly email to admin@aticleworld.com.

In the Last, I will also try to create a free eBook on Linux commands (Linux commands pdf) with its usage.

Recommended Articles for you:



Leave a Reply

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