Top 100 linux commands
Posted on: September 17, 2024 /
Categories: Internet
Here’s a comprehensive list of 100 essential Linux commands that cover a broad range of tasks. This list includes commands for file manipulation, system monitoring, networking, package management, and more:
File and Directory Management
ls– List directory contentscd– Change directorypwd– Print working directorymkdir– Make directoriesrmdir– Remove empty directoriesrm– Remove files or directoriescp– Copy files or directoriesmv– Move or rename files or directoriestouch– Change file timestamps or create empty filesfind– Search for files in a directory hierarchylocate– Find files by nameupdatedb– Update the database forlocatediff– Compare files line by linefile– Determine file typechmod– Change file modes or Access Control Listschown– Change file owner and groupchgrp– Change group ownershipln– Create hard and symbolic links
Text Processing
cat– Concatenate and display filestac– Concatenate and display files in reversemore– View file contents page by pageless– View file contents page by page (with backward movement)head– Output the first part of filestail– Output the last part of filesgrep– Search text using patternssed– Stream editor for filtering and transforming textawk– Pattern scanning and processing languagecut– Remove sections from each line of filespaste– Merge lines of filessort– Sort lines of text filesuniq– Report or omit repeated lineswc– Print newline, word, and byte counts for each filetr– Translate or delete charactersxargs– Build and execute command lines from standard input
System Monitoring and Management
top– Display Linux taskshtop– Interactive process viewer (requires installation)ps– Report process statusdf– Report file system disk space usagedu– Estimate file space usagefree– Display amount of free and used memoryuptime– Tell how long the system has been runningvmstat– Report virtual memory statisticsiostat– Report CPU and I/O statisticslsof– List open filesnetstat– Print network connections, routing tables, interface statisticsss– Utility to investigate socketsdmesg– Print or control the kernel ring buffersystemctl– Control the systemd system and service managerjournalctl– Query and display messages from the journalshutdown– Bring the system downreboot– Reboot the system
Networking
ping– Send ICMP ECHO_REQUEST to network hostsifconfig– Configure a network interface (deprecated, useip)ip– Show/manipulate routing, devices, policy routing, and tunnelsnetcat(ornc) – Read and write data across network connectionswget– Non-interactive network downloadercurl– Transfer data from or to a serverssh– OpenSSH SSH client (remote login program)scp– Secure copy (remote file copy program)ftp– File Transfer Protocol clientsftp– Secure File Transfer Protocol clienttraceroute– Print the route packets take to the network hosthost– DNS lookup utilitydig– DNS lookupwhois– Whois query program
Package Management
apt-get– APT package handling utility (Debian-based systems)apt– High-level package management command-line interface (Debian-based)yum– Package manager for RPM-based distributions (e.g., CentOS, RHEL)dnf– Package manager for RPM-based distributions (successor to yum)rpm– RPM package managerpacman– Package manager for Arch Linuxzypper– Command-line interface of ZYpp package manager (openSUSE)snap– Package management system that allows installing snapsflatpak– System for building, distributing, and running sandboxed desktop applications
Disk Management
fdisk– Partition table manipulator for Linuxparted– A partition manipulation programmkfs– Build a Linux file systemfsck– File system consistency check and repairmount– Mount a file systemumount– Unmount file systemsblkid– Locate/print block device attributeslsblk– List information about block devices
User Management
useradd– Create a new user or update default new user informationusermod– Modify a user accountuserdel– Delete a user account and related filespasswd– Change user passwordgroupadd– Create a new groupgroupdel– Delete a groupgroups– Show which groups a user belongs toid– Print user and group information
Process Management
kill– Send a signal to a processkillall– Kill processes by namepkill– Send signals to processes based on name and other attributesnohup– Run a command immune to hangupsjobs– List active jobsfg– Bring a job to the foregroundbg– Resume a stopped job in the background
System Information
uname– Print system informationhostname– Show or set the system’s hostnamedate– Display or set the system date and time
These commands provide a solid foundation for managing and interacting with a Linux system.