Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Shell Scripting
  • Kali Linux
  • Ubuntu
  • Red Hat
  • CentOS
  • Docker in Linux
  • Kubernetes in Linux
  • Linux interview question
  • Python
  • R
  • Java
  • C
  • C++
  • JavaScript
  • DSA
Open In App
Next Article:
ls Command in Linux
Next article icon

Linux Commands

Last Updated : 07 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Linux commands are essential for controlling and managing the system through the terminal. This terminal is similar to the command prompt in Windows. It’s important to note that Linux/Unix commands are case-sensitive. These commands are used for tasks like file handling, process management, user administration, networking, and system monitoring. Here’s a list of A to Z Linux commands, covering all operations that can be performed on the Linux terminal, including complete Linux commands for file management, process control, networking, user administration, and system monitoring:

CommandsDescription
accessUsed to check whether the calling program has access to a specified file. It can be used to check whether a file exists or not
acctonUsed to turn on or turn off the process for accounting or change info process accounting file
aclocalUsed to automatically generate aclocal.m4 files from configure.in file
acpiUsed to display the battery status and other ACPI information
acpi_availableTests whether ACPI (Advanced Configuration and Power Interface) subsystem is available or not
acpidIt provides intelligent power management on a system and is used to notify the user-space programs about the ACPI events
addr2lineUsed to convert addresses into file names and line numbers
agettyIt is a Linux version of getty, which is a Unix program running on a host computer that manages physical or virtual terminals to allow multi-user access
aliasInstructs the shell to replace one string with another string while executing the commands
amixerIt is a command-line mixer for ALSA(Advanced Linux Sound Architecture) sound-card driver
aplayIt is a command-line audio player for ALSA(Advanced Linux Sound Architecture) sound card drivers.
aplaymidiUsed to play standard MIDI(Musical Instrument Digital Interface) files, by sending the content of a MIDI file to an ALSA(Advanced Linux Sound Architecture) MIDI port
aproposIt helps the user when they don’t remember the exact command but knows a few keywords related to the command that define its uses or functionality
aptProvides a high-level CLI (Command Line Interface) for the package management system and is intended as an interface for the end user which enables some options better suited for interactive usage by default compared to more specialized APT tools like apt-cache and apt-get
apt-getIt is a command-line tool which helps in handling packages in Linux
aptitudeOpens up a highly built-in interface to interact with the package manager of the machine
arUsed to create, modify and extract the files from the archives
archUsed to print the computer architecture
arpIt manipulates the System’s ARP cache. It also allows a complete dump of the ARP cache
aspellUsed as a spell checker in Linux
atdIt is a job scheduler daemon that runs jobs scheduled for later execution
atrmUsed to remove the specified jobs. To remove a job, its job number is passed in the command
atqIt displays the list of pending jobs which are scheduled by the user
autoconfUsed in Linux to generate configuration scripts
autoheaderUsed to create a template file of C “#define” or any other template header for configure to use
automakeUsed for automatically generating Makefile.in files compliant with the set GNU Coding Standards
autoreconfUsed to create automatically buildable source code for Unix-like systems
autoupdateUsed to update configure.in file in our Linux system to a newer Autoconf.
awkIt is a scripting language used for manipulating data and generating reports
bannerUsed to print the ASCII character string in large letter to standard output
basenameIt strips directory information and suffixes from file names i.e. it prints the file name NAME with any leading directory components removed
batchUsed to read commands from standard input or a specified file and execute them when system load levels permit i.e. when the load average drops below 1.5
bcUsed for command line calculator
bgUsed to place foreground jobs in background
biffA mail notification system for unix that notifies the user at the command line when new mail arrives and tells from whom it is
bindUsed to set Readline key bindings and variables
bisonIt is basically a parser generator similar to yacc
breakUsed to terminate the execution of for loop, while loop and until loop
builtinUsed to run a shell builtin, passing it arguments(args), and also to get the exit status
bzcmpUsed to invoke the cmp utility on bzip2 compressed files
bzdiffUsed to compare the bzip2 compressed files
bzgrepUsed to search for a pattern or an expression but inside a bzip2-compressed file
bzip2Used to compress and decompress the files
bzlessIt does not have to read the entire input file before starting, so with a large file, it starts up faster
bzmoreUsed as a filter for CRT viewing of bzip2 compressed files, which are saved with .bz2 suffix
calUsed to see the calendar of a specific month or a whole year. By default, it shows current month's calendar as output
caseIt is the best alternative when we had to use multiple if/elif on a single variable
catReads data from file and gives their content as output. It helps us to create, view, concatenate files
ccIt is used to compile the C language codes and create executables
ccryptIt is a command line tool for encryption and decryption of data
cdKnown as change directory command. It is used to change current working directory
cfdiskIt displays or manipulates the disk partition table by providing a text-based “graphical” interface
chageUsed to view and change the user password expiry information
chattrIt is a file system command which is used for changing the attributes of a file in a directory
chfnIt allows you to change a user’s name and other details easily. chfn stands for Change finger
chgrpUsed to change the group ownership of a file or directory
chkconfigUsed to list all available services and view or update their run level settings
chmodUsed to change the access mode of a file
chownUsed to change the file Owner or group
chpasswdUsed to change password for multiple users at a time
chrootUsed to change the root directory
chrtUsed for manipulating the real-time attributes of a process
chshUsed to change the user’s login shell(currently login shell)
chvtUsed to switch between the different TTY (TeleTYpewriter) terminals available
cksumUsed to display a CRC(Cyclic Redundancy Check) value, the byte size of the file and the name of the file to standard output
clearUsed to clear the terminal screen
cmpUsed to compare the two files byte by byte and helps you to find out whether the two files are identical or not
colIt is used to filter out reverse line feeds. The col utility simply reads from the standard input and writes to standard output
colcrtUsed to format the text processor output so that it can be viewed on Cathode Ray Tube displays
colrmRemoves selected columns from a file
columnUsed to display the contents of a file in columns
commCompares two sorted files line by line and write to standard output; the lines that are common and the lines that are unique
compressUsed to reduce the file size. After compression, the file will be available with an added .Z extension
continueUsed to skip the current iteration in for, while and until loop
cpUsed to copy files or group of files or directory
cpiocpio stands for “copy in, copy out“. It is used for processing the archive files like *.cpio or *.tar. This command can copy files to and from archives
cppIt is automatically used by C compiler to transform your program before compilation
cronA software utility, offered by Linux-like operating system which automates the scheduled task at a predetermined time
crontabA list of commands that you want to run on a regular schedule, and also the name of the command used to manage that list
csplitUsed to split any file into many parts as required by the user
ctagsIt allows quick access across the files (For example quickly seeing definition of a function)
cupsdIt is a type of scheduler for CUPS (Common Unit Printing System). It implements the printing system on the basis of the Internet Printing Protocol
curlA tool to transfer data to or from a server, using any of the supported protocols
cutFor cutting out the sections from each line of files and writing the result to standard output
cvsUsed to store the history of a file. Whenever a file gets corrupted or anything goes wrong “cvs” help us to go back to the previous version and restore our file
dateUsed to display the system date and time. It is also used to set date and time of the system
dcUsed to evaluate arithmetic expressions. It evaluates expressions in the form of a postfix expression
ddIt is a command-line utility for Unix and Unix-like operating systems whose primary purpose is to convert and copy files
declareUsed to declare shell variables and functions, set their attributes and display their values
depmodUsed to generate a list of dependency description of kernel modules and its associated map files
dfUsed to display information related to file systems about total space and available space
diffUsed to display the differences in the files by comparing the files line by line
diff3Used to compare the three files line by line
dirUsed to list the contents of a directory
dirnameUsed to remove the trailing forward slahes “/” from the NAME and prints the remaining portion
dirsUsed to display the list of currently remembered directories
disableUsed to stop the printers or classes
dmesgUsed to examine the kernel ring buffer and print the message buffer of kernel
dmidecodeUsed when the user wants to retrieve system’s hardware related information such as Processor, RAM(DIMMs), BIOS detail, etc. of Linux system in a readable format
domainnameUsed to return the Network Information System (NIS) domain name of the host
dos2unixConverts a DOS text file to UNIX format
dosfsckDiagnoses MS-DOS file system for problems and attempts to repair them
dstatUsed to retrieve information or statistics form components of the system such as network connections, IO devices, or CPU, etc.
duUsed to track the files and directories which are consuming excessive amount of space on hard disk drive
dumpUsed to backup the filesystem to some storage device
dumpe2fsUsed to print the super block and blocks group information for the filesystem present on device
dumpkeysUsed for the dump keyboard translation tables
echoUsed to display line of text/string that are passed as an argument
edUsed for launching the ed text editor which is a line-based text editor with a minimal interface which makes it less complex for working on text files i.e creating, editing, displaying and manipulating files
egrepIt treats the pattern as an extended regular expression and prints out the lines that match the pattern
ejectIt allows ejecting a removable media (typically a CD-ROM, floppy disk, tape, or JAZ or ZIP disk) using the software
emacsIt is a editor having simple user interface. Also, there is no insert mode in this editor. It only have editing mode.
enableUsed to start the printers or classes
envUsed to either print environment variables. It is also used to run a utility or command in a custom environment
evalBuilt-in command used to execute arguments as a shell command
exIt is a text editor in Linux which is also termed as the line editor mode of the vi editor
execUsed to execute a command from the bash itself
exitUsed to exit the shell where it is currently running
expandAllows you to convert tabs into spaces in a file and when no file is specified it reads from standard input
expectThis command or scripting language works with scripts that expect user inputs. It automates the task by providing inputs
exportIt is bash shell BUILTINS commands, which means it is part of the shell. It marks an environment variables to be exported to child-processes
exprIt evaluates a given expression and displays its corresponding output
factorUsed to print the prime factors of the given numbers, either given from command line or read from standard input
fcUsed to list, edit or re-execute the commands previously entered into an interactive shell
fc-cacheIt scans the font directories and build font cache for applications which use fontconfig for their font handling
fc-listIt is used to list the available fonts and font styles. Using the format option, the list of all fonts can be filtered and sorted out
fdiskFormat disk is a dialog-driven command in Linux used for creating and manipulating disk partition table
fgUsed to put a background job in foreground
fgrepUsed to search for the fixed-character strings in a file
fileUsed to determine the type of a file. .file type may be of human-readable(e.g. ‘ASCII text’) or MIME type(e.g. ‘text/plain; charset=us-ascii’)
findUsed to find files and directories and perform subsequent operations on them
fingerIt is a user information lookup command which gives details of all the users logged in.
fmtWorks as a formatter for simplifying and optimizing text files
foldIt wraps each line in an input file to fit a specified width and prints it to the standard output
forUsed to repeatedly execute a set of command for every element present in the list
freeDisplays the total amount of free space available along with the amount of memory used and swap memory in the system, and also the buffers used by the kernel
FunUsed to draw various type of patterns on the terminal
functionUsed to create functions or methods
g++Used for preprocessing, compilation, assembly and linking of source code to generate an executable file
gawkUsed for pattern scanning and processing language
gccGNU Compiler Collections is used to compile mainly C and C++ language. It can also be used to compile Objective C and Objective C++
gdbGNU Debugger tool helps to debug the programs written in C, C++, Ada, Fortran, etc.
getentUsed to get the entries in a number of important text files called databases
gpasswdUsed to administer the /etc/group and /etc/gshadow
grepSearches a file for a particular pattern of characters, and displays all lines that contain that pattern
groupaddUsed to create a new user group
groupdelUsed to delete a existing group
groupmodUsed to modify or change the existing group on Linux system
groupsGroups are the collection of users. Groups make it easy to manage users with the same security and access privileges
grpckIt verifies the integrity of the groups information. It checks that all entries in /etc/group and /etc/gshadow have the proper format and contain valid data
grpconvIt is used to convert to shadow groups. The grpconv command creates a gshadow from the group and an optionally existing gshadow
gsThis command invokes Ghostscript, which is an interpreter of Adobe Systems PostScript and Portable Document Format(PDF) languages
gunzipUsed to compress or expand a file or a list of files in Linux
gzexeUsed to compress executable files and also used to automatically uncompress and execute the files
gzipThis command compresses files. Each single file is compressed into a single file.
haltUsed to instruct the hardware to stop all the CPU functions. Basically, it reboots or stops the system.
hashUsed to maintain a hash table of recently executed programs
hdparmUsed to get statistics about the hard disk, alter writing intervals, acoustic management, and DMA settings
HeadPrints the top N number of data of the given input
helpDisplays information about shell built-in commands
hexdumpUsed to filter and display the specified files, or standard input in a human readable specified format
historyUsed to view the previously executed command
hostUsed for DNS (Domain Name System) lookup operations
hostidUsed to displays the Host’s ID in hexadecimal format
hostnameUsed to obtain the DNS(Domain Name System) name and set the system’s hostname or NIS(Network Information System) domain name.
hostnamectlProvides a proper API used to control Linux system hostname and change its related settings
htopIt is a command line utility that allows the user to interactively monitor the system’s vital resources or server’s processes in real time
hwclockUtility for accessing the hardware clock, also called Real Time Clock (RTC)
iconvUsed to convert some text in one encoding into another encoding
idUsed to find out user and group names and numeric ID’s (UID or group ID) of the current user or any other user in the server
ifUsed to execute commands based on conditions
ifconfigUsed to configure the kernel-resident network interfaces.
iftopIt is a network analyzing tool used by system administrators to view the bandwidth related stats
ifupIt basically brings the network interface up, allowing it to transmit and receive data
importUsed for capturing a screenshot for any of the active pages we have and it gives the output as an image file
infoReads documentation in the info format. It will give detailed information for a command when compared with the main page
insmodUsed to insert modules into the kernel
installUsed to copy files and set attributes
iostatUsed for monitoring system input/output statistics for devices and partitions
iotopUsed to display and monitor the disk IO usage details and even gets a table of existing IO utilization by the process
ipUsed for performing several network administration tasks
ipcrmUsed to remove some IPC(Inter-Process Communication) resources. It eliminates the IPC objects and their associated data structure form the system
ipcsShows information on the inter-process communication facilities for which the calling process has read access
iptablesUsed to set up and maintain tables for the Netfilter firewall for IPv4, included in the Linux kernel
iptables-saveIt will save the current iptables rules in a user specified file, that can be used later when the user wants
iwconfigUsed to display the parameters, and the wireless statistics which are extracted from /proc/net/wireless
joinIt is a command line utility for joining lines of two files based on a key field present in both the files
journalctlUsed to view systemd, kernel and journal logs
killUsed to terminate processes manually. kill command sends a signal to a process which terminates the process
lastUsed to display the list of all the users logged in and out since the file /var/log/wtmp was created
lessUsed to read contents of text file one page(one screen) per time
letUsed to evaluate arithmetic expressions on shell variables
lnUsed to create links between files
locateUsed to find the files by name
lookShows the lines beginning with a given string
lsblkUsed to display details about block devices and these block devices(Except ram disk) are basically those files that represent devices connected to the pc.
lshwUsed to generate the detailed information of the system’s hardware configuration from various files in the /proc directory
lsmodUsed to display the status of modules in the Linux kernel. It results in a list of loaded modules
lsofProvides a list of files that are opened
lsusbUsed to display the information about USB buses and the devices connected to them
mailqThis command in Linux prints the mail queue i.e the list of messages that are there in the mail queue
manUsed to display the user manual of any command that we can run on the terminal
md5sumTo verify data integrity using MD5 (Message Digest Algorithm 5)
mkdirAllows the user to create directories. This command can create multiple directories at once
modinfoUsed to display the information about a Linux Kernel module
moreUsed to view the text files in the command prompt, displaying one screen at a time in case the file is large (For example log files)
mountUsed to mount the filesystem found on a device to big tree structure(Linux filesystem) rooted at ‘/‘
mpstatUsed to report processor related statistics.
mvUsed to move one or more files or directories from one place to another in file system like UNIX
nc(netcat)It is one of the powerful networking tool, security tool or network monitoring tool.
netstatDisplays various network related information such as network connections, routing tables, interface statistics, masquerade connections, multicast memberships, etc.
nmcliUsed for controlling NetworkManager. nmcli command can also be used to display network device status, create, edit, activate/deactivate, and delete network connections
nslookupIt is a network administration tool for querying the Domain Name System (DNS) to obtain domain name or IP address mapping or any other specific DNS record
odUsed to convert the content of input in different formats with octal format as the default format
passwdUsed to change the user account passwords
pasteUsed to join files horizontally (parallel merging) by outputting lines consisting of lines from each file specified, separated by tab as delimiter, to the standard output
pidofUsed to find out the process IDs of a specific running program
pingUsed to check the network connectivity between host and server/host
pinkyIt is a user information lookup command which gives details of all the users logged in. Unlike finger, in the pinky, you may trim the information of your interest.
pmapUsed to display the memory map of a process. A memory map indicates how memory is spread out
poweroffSends an ACPI signal which instructs the system to power down
printfUsed to display the given string, number or any other format specifier on the terminal window
psUsed to list the currently running processes and their PIDs along with some other information depends on different options
pwdIt prints the path of the working directory, starting from the root
ranlibUsed to generate index to archive
rcpUsed to copy files from one computer to another computer
readReads up the total number of bytes from the specified file descriptor into the buffer
readelfUsed to get information of ELF(Executable and Linkable Format) Files
readlinkUsed to print resolved symbolic links or canonical file names
rebootInstructs the system to restart or reboot
renameUsed to rename the named files according to the regular expression perlexpr
resetUsed to initialize the terminal. This is useful once a program dies leaving a terminal in an abnormal state
restoreUsed for restoring files from a backup created using dump
returnUsed to exit from a shell function.
revUsed to reverse the lines characterwise
rmUsed to remove objects such as files, directories, symbolic links and so on from the file system like UNIX
rmdirUsed to remove empty directories from the filesystem in Linux
rmmodUsed to remove a module from the kernel
routeUsed when you want to work with the IP/kernel routing table
rsyncIt is a software utility for Unix-Like systems that efficiently sync files and directories between two hosts or machines
sarUsed to monitor Linux system’s resources like CPU usage, Memory utilization, I/O devices consumption, etc.
scpUsed to copy file(s) between servers in a secure way.
screenProvides the ability to launch and use multiple shell sessions from a single ssh session
scriptUsed to make typescript or record all the terminal activities
scriptreplayUsed to replay a typescript/terminal_activity stored in the log file that was recorded by the script command
sdiffUsed to compare two files and then writes the results to standard output in a side-by-side format
sedUsed for finding, filtering, text substitution, replacement and text manipulations like insertion, deletion search etc.
selectUsed to create a numbered menu from which a user can select an option
seqUsed to generate numbers from FIRST to LAST in steps of INCREMENT
setsidUsed to run a program in a new session
shiftShifts/moves the command line arguments to one position left.
showkeyprints to standard output either the scan codes or the key code or the `ascii’ code of each key pressed
shredUsed in order to delete a file completely from hard disk
shutdownUsed to shutdown the system in a safe way
sleepUsed to create a dummy job. A dummy job helps in delaying the execution
sourceUsed to read and execute the content of a file(generally set of commands), passed as an argument in the current shell script
sortUsed to sort a file, arranging the records in a particular order
splitUsed to split large files into smaller files
sshProtocol used to securely connect to a remote server/system
straceIt is one of the most powerful process monitoring, diagnostic, instructional tool of Linux.
sttyUsed to change and print terminal line settings
sudoUsed as a prefix of some command that only superuser are allowed to run
sumUsed to find checksum and count the blocks in a file
syncUsed to synchronize cached writes to persistent storage
systemctlUsed to examine and control the state of “systemd” system and service manager
tacUsed to concatenate and print files in reverse
TailPrints the last N number of data of the given input
tarUsed to create Archive and extract the Archive files
teeReads the standard input and writes it to both the standard output and one or more files
timeUsed to execute a command and prints a summary of real-time, user CPU time and system CPU time spent by executing a command when it terminates
topProvides a dynamic real-time view of the running system
touchUsed to create, change and modify timestamps of a file
trIt is a command line utility for translating or deleting characters
tracepathUsed to traces path to destination discovering MTU along this path
traceroutePrints the route that a packet takes to reach the host
TreeA recursive directory listing program that produces a depth-indented listing of files
ttyIt displays the information related to terminal. It basically prints the file name of the terminal connected to standard input
typeUsed to describe how its argument would be translated if used as commands
unameDisplays the information about the system
unexpandConverts each spaces into tabs writing the produced output to the standard output
uniqIt is a command line utility that reports or filters out the repeated lines in a file
unix2dosConverts a Unix text file to DOS format
untilUsed to execute a set of commands as long as the final command in the ‘until’ Commands has an exit status which is not zero
UptimeUsed to find out how long the system is active (running)
useraddUsed to add user accounts to your system
usermodUsed to change the properties of a user in Linux through the command line
usernameIt provides a set of commands to fetch username and its configurations from the Linux host
usersUsed to show the user names of users currently logged in to the current host
userdelUsed to delete a user account and related files
viIt is the default editor that comes with the UNIX operating system is called visual editor.
vmstatIt is a performance monitoring command of the system as it gives the information about processes, memory, paging, block IO, disk and CPU scheduling
vnstatUsed by system administrators in order to monitor network parameters such as bandwidth consumption or maybe some traffic flowing in or out
wUsed to show who is logged on and what they are doing
wallDisplays a message, or the contents of a file, or otherwise its standard input, on the terminals of all currently logged in users
watchUsed to execute a program periodically, showing output in fullscreen
wcUsed to find out number of lines, word count, byte and characters count in the files specified in the file arguments
WgetUsed to download files from the server even when the user has not logged on to the system and it can work in background without hindering the current process
whatisUsed to get a one-line manual page descriptions
whichUsed to locate the executable file associated with the given command by searching it in the path environment variable
whileUsed to repeatedly execute a set of command as long as the COMMAND returns true
whoUsed to get information about currently logged in user on to system
whoamiDisplays the username of the current user when this command is invoked
writeAllows a user to communicate with other users, by copying lines from one user’s terminal to others
xargsUsed to build and execute commands from standard input. It converts input received from standard input into arguments of a command
xdg-openUsed to open a file or URL in the user’s preferred application
yesUsed to print a continuous output stream of given STRING. If STRING is not mentioned then it prints ‘y’
zdiffUsed to invoke the diff program on files compressed via gzip
zdumpUsed to print the current time in the specified zone or you can say prints the current time in each zonename named on the command line
zgrepUsed to search out expressions from a given a file even if it is compressed
zipIt is a compression and file packaging utility for Unix. Each file is stored in single .zip {.zip-filename} file with the extension .zip

Recent Articles on Linux/Unix!

More on Linux Commands:

  • Basic Linux Commands for day to day life
  • Daily life Linux Commands
  • Basic Shell Commands in Linux
  • Difference between grep and fgrep command
  • Running previous command with sudo
  • Linux | Nmon
  • Run commands as root with sudo
  • Custom commands for linux terminal
  • Implementation of ls | wc command
  • Linux man page entries | different types
  • Commands in Unix when things go wrong
  • Soft and Hard links in Unix/Linux
  • Regular Expression in grep
  • Essential Linux/Unix Commands
  • Important Linux Commands (leave, diff, cal, ncal, locate and ln)
  • Practical applications of ‘ls’ command in Linux
  • Network configuration and trouble shooting commands in Linux
  • mindepth and maxdepth in Linux find() command for limiting search to a specific directory
  • How to Access All Users in Linux Using Different Commands?
  • How to Build Your Own Commands in Linux?
  • SetUID, SetGID, and Sticky Bits in Linux File Permissions

Next Article
ls Command in Linux

A

abhishek1
Improve
Article Tags :
  • Linux-Unix
  • linux-command
  • Tutorials

Similar Reads

    Linux Commands
    Linux commands are essential for controlling and managing the system through the terminal. This terminal is similar to the command prompt in Windows. It’s important to note that Linux/Unix commands are case-sensitive. These commands are used for tasks like file handling, process management, user adm
    15+ min read

    File and Directory Manipulation

    ls Command in Linux
    The ls command is one of the most used commands in the Linux terminal to display the files and directories or path in the terminal. So, using the ls command is a basic skill for navigating the Linux file system, handling files, and managing directories.What is the ls Command in LinuxThe ls command i
    10 min read
    How to Change the Directory in Linux | cd Command
    Navigating the Linux file system is like exploring a vast library; each directory (folder) holds its own collection of files and subdirectories, and knowing how to move between them efficiently is the first step to mastering the command line. The cd (Change Directory) command is your compass in this
    7 min read
    How to Display Current Working Directory in Linux | pwd Command
    The 'pwd,' which stands for "print working directory." In this article, we will delve into the 'pwd' command, exploring its functionality, usage, and various examples. It prints the path of the working directory, starting from the root. pwd is shell built-in command(pwd) or an actual binary(/bin/pwd
    4 min read
    How to Create Directory in Linux | mkdir Command
    In Linux, the 'mkdir' command is like a magic wand for creating folders super easily. 'mkdir' stands for "make directory," and it helps you organize your computer stuff by creating folders with just one command. Whether you're making one folder or a bunch of them in a row, 'mkdir' is there to help y
    7 min read
    rm command in Linux with examples
    rm stands for remove here. rm command is used to remove objects such as files, directories, symbolic links and so on from the file system like UNIX. To be more precise, rm removes references to objects from the filesystem, where those objects might have had multiple references (for example, a file w
    5 min read
    How to Copy Files and Directories in Linux | cp Command
    The cp (copy) command is your go-to tool in Linux for duplicating files and folders quickly. Whether you’re backing up data, organizing files, or sharing content, cp lets you copy items between locations while keeping the original intact. The cp command requires at least two filenames in its argumen
    8 min read
    How to Move File in Linux | mv Command
    In UNIX-based operating systems like Linux and macOS, `mv` stands for "move". The mv command is a UNIX command for renaming and moving files and directories within a filesystem. Although desktop operating systems have graphical user interfaces for file operations, calling mv in the terminal, usually
    7 min read
    How to Create an Empty File in Linux | Touch Command
    The touch command is a standard command used in the UNIX/Linux operating system which is used to create, change and modify the timestamps of a file. Basically, there are two different commands to create a file in the Linux system which are as follows: touch command: It is used to create a file witho
    7 min read
    How to View the Content of File in Linux | cat Command
    The cat command in Linux is more than just a simple tool, it's a versatile companion for various file-related operations, allowing users to view, concatenate, create, copy, merge, and manipulate file contents. Let's see the details of some frequently used cat commands, understanding each example alo
    7 min read
    grep command in Unix/Linux
    The grep command in Unix/Linux is a powerful tool used for searching and manipulating text patterns within files. Its name is derived from the ed (editor) command g/re/p (globally search for a regular expression and print matching lines), which reflects its core functionality. grep is widely used by
    7 min read

    File Operations and Compression

    How to Find a File in Linux | Find Command
    The find command in Linux is used to search for files and directories based on name, type, size, date, or other conditions. It scans the specified directory and its sub directories to locate files matching the given criteria.find command uses are:Search based on modification time (e.g., files edited
    9 min read
    How to Compress Files in Linux | Tar Command
    File compression is a fundamental task in managing and transferring data efficiently on a Linux system. The Tar command, short for Tape Archive, is a powerful tool that allows users to create compressed and archived files. In this comprehensive guide, we will explore the various options and examples
    11 min read
    Gzip Command in Linux
    The gzip command in Linux is a vital tool for compressing files and reducing their sizes. It employs the DEFLATE compression algorithm , which makes it highly effective for compressing large files or preparing data for transfer over networks.Whether you’re a Linux system administrator or a beginner,
    5 min read
    gunzip Command in Linux with Examples
    The gunzip command in Linux is a popular tool for decompressing files compressed with gzip. It simplifies file unzipping, enhances file management, and optimizes disk space in Linux environments.In this blog post, we will explore how gunzip works, providing practical examples for you to try. Whether
    5 min read
    ZIP command in Linux with examples
    In Linux, the zip command compresses one or more files or directories into a single.zip archive file. This saves disk space, keeps data organized, and makes it simple to share or backup files. It's among the most used compression utilities, particularly when sharing large files via email or storing
    6 min read
    How to Install Zip and Unzip in Linux?
    Zip is a command-line compression utility for files and directories. File and folder compression allows for quicker and more reliable file and folder transfer, storage, and email. Unzip, on the other hand, is a program that allows you to decompress files and directories. zip is used to compress the
    2 min read
    How to Make Script Executable in Linux | chmod Command
    In Unix operating systems, the chmod command is used to change the access mode of a file. The name is an abbreviation of change mode. Which states that every file and directory has a set of permissions that control the permissions like who can read, write or execute the file. In this the permissions
    7 min read
    How to Change File Ownership in Linux | chown Command
    In the Linux operating system, file ownership is a crucial aspect of system security and user management. The chown command, short for "change owner," is a powerful tool that allows users to change owner of file in Linux. This command is particularly useful in scenarios where administrators need to
    9 min read
    chgrp command in Linux with Examples
    The `chgrp` command in Linux is used to change the group ownership of a file or directory. All files in Linux belong to an owner and a group. You can set the owner by using “chown” command, and the group by the "chgrp" command. Syntax of `chgrp` command in Linuxchgrp [OPTION]… GROUP FILE… chgrp [OPT
    3 min read
    How to List Running Processes in Linux | ps Command
    As we all know Linux is a multitasking and multi-user system. So, it allows multiple processes to operate simultaneously without interfering with each other. Process is one of the important fundamental concepts of the Linux OS. A process is an executing instance of a program that carries out differe
    10 min read

    Network and Connectivity

    How to Monitor System Activity in Linux | top Command
    top command is used to show the Linux processes. It provides a dynamic real-time view of the running system. Usually, this command shows the summary information of the system and the list of processes or threads which are currently managed by the Linux Kernel. As soon as you will run this command it
    10 min read
    How to Kill a Process in Linux | Kill Command
    kill command in Linux (located in /bin/kill), is a built-in command which is used to terminate processes manually. kill command sends a signal to a process that terminates the process. If the user doesn't specify any signal that is to be sent along with the kill command, then a default TERM signal i
    6 min read
    ifconfig Command
    Knowing your IP address is fundamental for network administration, troubleshooting, and various Linux system tasks. In this article, we will explore several methods to find your IP address in a Linux environment. Whether you are a seasoned Linux user or just getting started, understanding these meth
    10 min read
    How to Check Network Connectivity in Linux | ping Command
    Ensuring a stable and reliable internet connection is crucial for seamless navigation and efficient communication in the world of Linux. The "ping" command is a powerful tool that allows users to check the status of their internet connection and diagnose network-related issues. In this article, we w
    7 min read
    How to use SSH to connect to a remote server in Linux | ssh Command
    Secure Shell, commonly known as SSH, is like a super-secure way to talk to faraway computers, called servers. It's like a secret tunnel on the internet that keeps your conversations safe and private. Imagine you're sending a letter, and instead of sending it openly, you put it in a magic envelope th
    8 min read
    How to Securely Copy Files in Linux | scp Command
    Secure file transfer is a crucial part of Linux systems administration. Whether moving sensitive files between local machines or transferring data between servers, or you need to move backup files to a remote server, fetch logs from a hosted machine, or sync directories across multiple systems, scp
    10 min read
    Wget Command in Linux/Unix
    Wget is the non-interactive network downloader which is used to download files from the server even when the user has not logged on to the system and it can work in the background without hindering the current process. GNU wget is a free utility for non-interactive download of files from the Web. It
    6 min read
    curl Command in Linux with Examples
    curl is a command-line utility for transferring data to or from a server, employing a range of internet protocols such as HTTP, HTTPS, FTP, SCP, and SFTP.Whether you want to download a file, test a REST API, or simply verify that a website is up and running, curl is your best friend. It is accessed
    5 min read
    How to Compare Files Line by Line in Linux | diff Command
    In the world of Linux, managing and comparing files is a common task for system administrators and developers alike. The ability to compare files line by line is crucial for identifying differences, debugging code, and ensuring the integrity of data. One powerful tool that facilitates this process i
    9 min read
    Head Command in Linux With Examples
    Need to quickly view the beginning of a file in Linux? The head command is your best option. This essential command-line tool enables users, developers, and system administrators to preview the start of log files, configuration files, CSV datasets, and other text documents in seconds.The head comman
    6 min read

    Text Processing and Manipulation

    Tail command in Linux with examples
    It is the complementary of head command. The tail command, as the name implies, prints the last N number of data of the given input. By default, it prints the last 10 lines of the specified files. If more than one file name is provided then data from each file is preceded by its file name. Syntax of
    7 min read
    How to sort lines in text files in Linux | sort Command
    The sort command in Linux is used to sort a file, arranging the records in a particular order. By default, the sort command sorts file assuming the contents are ASCII. Using options in the sort command can also be used to sort numerically.sort is a command that sorts text files alphabetically, numer
    7 min read
    AWK command in Unix/Linux with examples
    Awk is a scripting language used for manipulating data and generating reports. The awk command programming language requires no compiling and allows the user to use variables, numeric functions, string functions, and logical operators. Awk is a utility that enables a programmer to write tiny but eff
    8 min read
    Sed Command in Linux/Unix With Examples
    The SED command (short for Stream Editor) is one of the most powerful tools for text processing in Linux and Unix systems. It's commonly used for tasks like search and replace, text transformation, and stream editing.With SED, you can manipulate text files without opening them in an editor. This mak
    8 min read
    cut command in Linux with examples
    The cut command in linux is a command for cutting out the sections from each line of files and writing the result to standard output. It can be used to cut parts of a line by byte position, character, and field. The cut command slices a line and extracts the text. It is necessary to specify an optio
    8 min read
    tr command in Unix/Linux with examples
    The tr command is a UNIX command-line utility for translating or deleting characters. It supports a range of transformations including uppercase to lowercase, squeezing repeating characters, deleting specific characters, and basic find and replace. It can be used with UNIX pipes to support more comp
    4 min read
    echo command in Linux with Examples
    The echo command in Linux is a built-in command that allows users to display lines of text or strings that are passed as arguments. It is commonly used in shell scripts and batch files to output status text to the screen or a file. Syntax of `echo` command in Linuxecho [option] [string]Here, [option
    3 min read
    export command in Linux with Examples
    The 'export' command is one of the essential built-in commands in the Bash shell, allowing users to manage environment variables effectively. It is defined in POSIX standards, which state that the shell will assign the export attribute to specified variables, causing them to be included in the envir
    2 min read
    source Command in Linux with Examples
    If you're new to the world of Linux, you might have heard about commands that do various tasks, but some like the 'source' command might seem a bit confusing at first. Don't worry; let's break it down step by step.What is the Source Command?The source command in Linux is like a magic wand that lets
    7 min read
    How to Display Command History in Linux | history Command
    The history command in Linux is essential for terminal users, enabling them to view, search, and manipulate previously executed commands. Now, mastering this Linux command allows for efficient commands of commands, automation of repetitive tasks, and troubleshooting without the need to retype length
    3 min read

    Help and Information

    apropos command in Linux with Examples
    Linux/Unix comes with a huge number of commands and thus it become quite difficult sometimes to remember each and every command. apropos command becomes useful in such cases. apropos command helps the user when they don't remember the exact command but knows a few keywords related to the command tha
    3 min read
    info command in Linux with Examples
    info command reads documentation in the info format. It will give detailed information for a command when compared with the man page. The pages are made using the Texinfo tools which can link with other pages, create menus, and easy navigation. Here, we will explore the functionality of the info com
    3 min read
    How to Create and Use Alias Command in Linux
    Imagine you're lost in a maze of complicated Linux commands. You stumble upon a secret doorway marked "Alias," and inside you find shortcuts to all your favorite commands! That's what creating aliases is like. You get to make your own mini-commands for the long ones you use all the time, making thin
    6 min read
    uname command in Linux with Examples
    Linux, renowned for its open-source flexibility and powerful performance, offers a range of commands that reveal the inner workings of your system. Among these, the 'uname' command stands out as a versatile tool that provides key details about your Linux machine. Here, we will learn the basics of th
    4 min read
    df command in Linux with Examples
    Ever felt the chilling fear of a "disk full" error message on your Linux machine? Fear not, for the mighty df command stands ready to guide you through the treacherous terrain of disk space management! This article delves deep into the df command, equipping you with the knowledge and skills to navig
    5 min read
    du command in Linux with examples
    The `du` command in Linux is a powerful utility that allows users to analyze and report on disk usage within directories and files. Whether you're trying to identify space-hogging directories, manage disk space efficiently, or simply gain insights into storage consumption, the du command provides va
    6 min read
    How to Mount File System in Linux | mount Command
    Working with file systems is a fundamental part of managing a Linux system, and knowing how to mount them is a skill every Linux user should have. Whether you’re connecting a USB drive, accessing a network share, or setting up a new partition, the mount command is your go-to tool for making file sys
    6 min read
    ln command in Linux with Examples
    The 'ln' command in Linux is a powerful utility that allows you to create links between files. These links can either be hard links or soft (symbolic) links. If you're unfamiliar with these concepts, check out our detailed guide on Hard and Soft Links in Linux to understand their differences, use ca
    3 min read

    System Administration and Control

    How to Display Path of an Executable File in Linux | Which Command
    In Linux finding the exact path of an excutable file can be crucial for the system adminstration, scripting and as well for troubleshooting. The `which` command helps with providing a simple and effective way to locate the executable files within the directories that are listed in your system. In th
    6 min read
    whereis command in Linux with Examples
    'whereis' command is used to find the location of source/binary file of a command and manuals sections for a specified file in Linux system. If we compare 'whereis' command with 'find' command they will appear similar to each other as both can be used for the same purposes but 'whereis' command prod
    4 min read
    locate command in Linux with Examples
    locate command in Linux is used to find the files by name. There are two most widely used file-searching utilities accessible to users called to find and locate. The locate utility works better and faster than the find command counterpart because instead of searching the file system when a file sear
    6 min read
    How to Display and Set Date and Time in Linux | date Command
    Unlock the full potential of the date command in Linux—a versatile tool that does more than just show the current date and time. With this command, you can set your system’s clock, synchronize time across networks, and even calculate past or future dates for tasks like scheduling or logging. In this
    8 min read
    cal command in Linux with Examples
    The 'cal' command in Linux is a versatile tool that displays calendars directly in the terminal. If a user wants a quick view of the calendar in the Linux terminal, 'cal' is the command for you. Here’s a look at the usage and features of 'cal' command in Linux.What is the 'cal' command?cal command i
    2 min read
    How to Start, Stop and Restart Services in Linux Using systemctl Command
    System services play a crucial role in the functioning of a Linux system, handling various tasks and processes in the background. systemctl is a powerful command-line tool that allows users to manage these services effectively. In this article, we will explore the basics of using systemctl to start,
    9 min read
    shutdown command in Linux with Examples
    The `shutdown` operation in Linux is a crucial command for managing system power states, allowing administrators to halt safely, power off, or reboot the system. This command provides flexibility in scheduling downtimes, ensuring minimal disruption to users and processes. In this article, we will ex
    5 min read

    User and Group Management

    init command in Linux with examples
    The init process is the parent of all processes in Linux, identified by the process ID (PID) of 1. It is the first process that starts when a computer boots up and continues to run until the system shuts down. The term init stands for "initialization," and its primary role is to create and manage pr
    4 min read
    How to add User in Linux | useradd Command
    useradd is a command in Linux that is used to add user accounts to your system. It is just a symbolic link to adduser command in Linux and the difference between both of them is that useradd is a native binary compiled with the system whereas adduser is a Perl script that uses useradd binary in the
    5 min read
    usermod command in Linux with Examples
    usermod command or modify user is a command in Linux that is used to change the properties of a user in Linux through the command line. After creating a user we have to sometimes change their attributes like password or login directory etc. so in order to do that we use the Usermod command. The info
    4 min read
    How to Delete User in Linux | userdel Command
    Managing user accounts is an essential aspect of Linux system administration. Understanding how to delete a user in Linux is crucial, whether you need to remove an unused account, revoke access for a departing employee, or clean up your system for security reasons. Here, we will explore the 'userdel
    5 min read
    How to Create a new group in Linux | groupadd command
    In the Linux operating system, user management is a crucial aspect of system administration. One of the fundamental tasks is creating and managing user groups. Groups in Linux allow administrators to organize and control user access to various resources and files. The groupadd command is a powerful
    7 min read
    groupmod command in Linux with examples
    groupmod command in Linux is used to modify or change the existing group on Linux system. It can be handled by superuser or root user. Basically, it modifies a group definition on the system by modifying the right entry in the database of the group. Syntax: groupmod [option] GROUP Files: The groupmo
    2 min read
    How to Delete a Group in Linux | groupdel command
    Group management is a crucial aspect of Linux system administration, and understanding how to create, modify, and delete groups is essential for maintaining a secure and organized environment. In this article, we will delve into the process of deleting a group in Linux using the 'groupdel' command.
    3 min read
    How to Change User Password in Linux | passwd Command
    Securing user accounts is a fundamental aspect of maintaining a robust and secure Linux system. One essential task is changing user passwords regularly to prevent unauthorized access. The passwdpasswd command in Linux provides a straightforward and effective way to modify user passwords. This articl
    8 min read
    Difference Between su and su - Command in Linux
    As a new Linux user, you may always face confusion regarding the difference between `su` command and `su -` command. In Linux, the `su` command is used to switch to another user account. However, there are two variations of the `su` command: `su` and `su -` (su hyphen).Table of ContentWhat is Linux
    6 min read

    Privilege and Security Management

    chroot command in Linux with examples
    The 'chroot' command in Linux and Unix-like systems is used to change the root directory for the current running process and its child processes. This change creates a restricted environment, often referred to as a "chroot jail" or "jailed directory," where processes are limited to accessing only fi
    3 min read
    file command in Linux with examples
    The 'file' command in Linux is a vital utility for determining the type of a file. It identifies file types by examining their content rather than their file extensions, making it an indispensable tool for users who work with various file formats. The file type can be displayed in a human-readable f
    3 min read
    hexdump command in Linux with examples
    The 'hexdump' command in Linux is a versatile utility used to display file content or data from standard input in a human-readable format. It is invaluable for programmers and system administrators for debugging binary data, analyzing file structures, and verifying data integrity. Here we will get a
    5 min read
    wc command in Linux with examples
    wc stands for word count. As the name implies, it is mainly used for counting purpose.It is used to find out number of lines, word count, byte and characters count in the files specified in the file arguments.By default it displays four-columnar output.First column shows number of lines present in a
    6 min read
    tee command in Linux with examples
    tee command reads the standard input and writes it to both the standard output and one or more files. The command is named after the T-splitter used in plumbing. It basically breaks the output of a program so that it can be both displayed and saved in a file. It does both the tasks simultaneously, c
    2 min read
    script command in Linux with Examples
    The 'script' command in Linux is a versatile tool that allows you to record all terminal activities, including inputs and outputs, making it a valuable resource for developers, system administrators, educators, and anyone who needs to document terminal sessions. This command captures everything disp
    5 min read
    How To Generate SSH Key With ssh-keygen In Linux?
    Secure Shell(SSH) is a cryptographic network protocol used for operating remote services securely. It is used for remote operation of devices on secure channels using a client-server architecture that generally operates on Port 22. SSH is the successor of Telnet. SSH uses public and private keys to
    4 min read

    Process Management and Control

    'crontab' in Linux with Examples
    If you do manually backups , update logs, or restart services on your Linux machine? Imagine that running repetitive tasks overnight so your machine works for you while you rest. Here crontab, the native job scheduler in Linux, which enables users to easily automate commands, scripts, and system tas
    9 min read
    at Command in Linux with Examples
    In the world of Linux operating systems, there exists a powerful tool known as the "at command." The 'at' command provides users with the ability to schedule tasks to be executed at a later time, offering a convenient way to automate processes without manual intervention. Whether you need to run a s
    9 min read
    nohup Command in Linux with Examples
    Every command in Linux starts a process at the time of its execution, which automatically gets terminated upon exiting the terminal. Suppose, you are executing programs over SSH and if the connection drops, the session will be terminated, all the executed processes will stop, and you may face a huge
    5 min read
    bg command in Linux with Examples
    In Linux, the bg command is a useful tool that allows you to manage and move processes between the foreground and background. It's especially helpful when you want to multitask in the terminal by placing a process in the background, enabling you to continue using the terminal for other commands whil
    3 min read
    fg command in Linux with examples
    The fg command in Linux is used to bring a background job into the foreground. It allows you to resume a suspended job or a background process directly in the terminal window, so you can interact with it.Syntaxfg [job_spec]The job_spec is a way to refer to the background jobs that are currently runn
    3 min read
    Process Control Commands in Unix/Linux
    Process control commands in Unix are: bg - put suspended process into background fg - bring process into foreground jobs - list processes bg Command : bg is a process control command that resumes suspended process while keeping them running in the background. User can run a job in the background by
    3 min read
    Shell Script to Demonstrate Wait Command in Linux
    Wait command is one of the process management commands. There are different process commands in Linux mainly 5 commands are widely used which are ps, wait, sleep, kill, exit. ps is an acronym for process status. It displays information about the active processes. wait command will suspend execution
    4 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences