Categories
Useful Linux Commands For System Administrators
Linux is all about commands. Linux system administrator are the one who mostly deals with commands in Linux. In this Linux command post, we will show you some of the useful command with examples for Linux system admin.
Useful Linux Commands For System Administrators
1. gzip – file compression and decompression command
gzip Command Syntax:
gzip [OPTIONS] [FILES]
gzip sounds.mp3
2. b2zip – file compression and decompression command similar to gzip
You need to install B2zip tool before starting using it.
sudo apt install bzip2 For Debian/Ubuntu sudo yum install bzip2 For CentOS/RHEL sudo dnf install bzip2 For Fedora 22+
bzip2 option(s) filenames
3. dig – DNS lookup utility tool
Dig stands for Domain Information Groper and it is a network administration command-line tool for querying Domain Name System (DNS) name servers.
4. grep – Search a file for a pattern of characters, then display all matching lines
If you system doesn’t have grep installed then run the following command:
sudo apt install grep For Debian, Ubuntu and Mint sudo yum install grep For RHEL/CentOS/Fedora and Rocky Linux/AlmaLinux sudo emerge -a sys-apps/grep For Gentoo Linux sudo apk add grep For Alpine Linux sudo pacman -S grep For Arch Linux sudo zypper install grep For OpenSUSE
locate
– Command to search files in Linux.ps
– information about the currently running processes in Linux.cron
– set up scheduled tasks to run.nmcli
– network management command.traceroute
– You can use this command to check the route packets take to a specified host.mtr
– network diagnostic tool.nslookup
– query Internet name servers (NS) interactively.host
– Command for DNS lookups in Linux.uptime
– shows system uptime and load average in Linux.rsync
–Rsync is a file copying tool. It is used for remote file transfers and syncing. Rsync finds files that need to be transferred using a lqquick checkrq algorithm that looks for files that have changed in size or in the last-modified time. It reduces the time of transfer.top
– Command that shows an overall system view.vmstat
– Command that shows system memory, processes, interrupts paging, block I/O, and CPU info.htop
– Command to see the interactive process and manager.dstat
– You can run this command to view processes, memory, paging, I/O, CPU, etc., in real-time.iftop
– network traffic vieweriotop
– 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.Glances
andnmon
– htop and top Alternatives:ssh
– secure command-line access to remote Linux systems.sudo
– execute commands with administrative privilege.cd
– directory navigation.userdel
– used to delete a user account and all related files.usermod
– used to modify or change any attributes of an existing user account.pwd
– shows your current directory location.cp
– copying files and foldersnethogs
– network traffic analyzer.- .
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.ip
– from Iproute2, a collection of utilities for controlling TCP/IP networking and traffic control in Linux.ls
– list directory contents.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.man
– for reading system reference manuals.apropos
– Search man page names and descriptions.wget
– retrieve files over HTTP, HTTPS, FTP, and FTPS.curl
– transferring data using various network protocolsdd
– 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.df
– display disk space usage.du
– estimate file space usage.fsck
– tool for checking the consistency of a file system.whois
– client for the whois directory service.nc
– command-line networking utility.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.