0% found this document useful (0 votes)
6 views

The Linux Command-er (1001+ Command Hacks) - The Linux Command-er (1001+ Command Hacks)

The document provides a comprehensive list of various Linux commands categorized by their functionalities, including shell commands, file manipulation, user management, process management, and more. Each command is accompanied by a brief description to clarify its purpose. This serves as a useful reference for users looking to understand or utilize Linux commands effectively.

Uploaded by

divyasreem1601
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

The Linux Command-er (1001+ Command Hacks) - The Linux Command-er (1001+ Command Hacks)

The document provides a comprehensive list of various Linux commands categorized by their functionalities, including shell commands, file manipulation, user management, process management, and more. Each command is accompanied by a brief description to clarify its purpose. This serves as a useful reference for users looking to understand or utilize Linux commands effectively.

Uploaded by

divyasreem1601
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Group Name No.

Commands Command Description Package Name / Examples

Available Shells in Linux 1 sh Shell, the standard command language interpreter


2 bash GNU Bourne-Again SHell
3 nologin Prevent unprivileged users from logging into the system
4 zsh The Z shell
5 tcsh C shell with file name completion and command line editing
6 csh C shell with file name completion and command line editing
7 ksh Shell, the standard/restricted command and programming language

Bash Shell Built-in Commands 1 : Null command


2 . Execute commands from a file in the current shell
3 [ Evaluate conditional expression
4 alias Define or display aliases
5 bg Move jobs to the background
6 bind Set Readline key bindings and variables
7 break Exit for, while, or until loops
8 builtin Execute shell builtins
9 caller Return the context of the current subroutine call
10 cd Change the shell working directory
11 command Execute a simple command or display information about commands
12 compgen Display possible completions depending on the options
13 complete Specify how arguments are to be completed by Readline
14 compopt Modify or display completion options
15 continue Resume for, while, or until loops
16 declare Set variable values and attributes
17 dirs Display directory stack
18 disown Remove jobs from current shell
19 echo Write arguments to the standard output
20 enable Enable and disable shell builtins
21 eval Execute arguments as a shell command
22 exec Replace the shell with the given command
23 exit Exit the shell
24 export Set export attribute for shell variables
25 false' Return an unsuccessful result
26 fc Display or execute commands from the history list
27 fg Move job to the foreground
28 getopts Parse option arguments
29 hash Remember or display program locations
30 help Display information about builtin commands
31 history Display or manipulate the history list
32 jobs Display status of jobs
33 kill Send a signal to a job
34 let Evaluate arithmetic expressions
35 local Define local variables
36 logout Exit a login shell
37 mapfile Read lines from the standard input into an indexed array variable
38 popd Remove directories from stack
39 printf Formats and prints ARGUMENTS under control of the FORMAT
40 pushd Add directories to stack
41 pwd Print the name of the current working directory
42 read Read lines from a file into an array variable
43 readonly Mark shell variables as unchangeable
44 return Return from a shell function
45 set Set or unset values of shell options and positional parameters
46 shift Shift positional parameters
47 shopt Set and unset shell options
48 source Execute commands from a file in the current shell
49 suspend Suspend shell execution
50 test Evaluate conditional expression
51 times Display process times
52 trap Trap signals and other events
53 true Return a successful result
54 type Display information about command type
55 typeset Set variable values and attributes
56 ulimit Modify shell resource limits
57 umask Display or set file mode mask
58 unalias Display or set file mode mask
59 unset Unset values and attributes of shell variables and functions
60 wait Wait for job completion and return exit status

File / Directory Manipulation Commands 1 ls List directory contents


2 cp Copy files and directories
3 mv Move (rename) files
4 rm Remove files or directories
5 mkdir Make directories
6 rmdir Remove empty directories
7 lsof List open files
8 mktemp create a temporary file or directory *
9 mountpoint see if a directory is a mountpoint *
10 mount.cifs mount using the Common Internet File System (CIFS) *

File Creation / Information / Conversion 1 touch Change file timestamps


2 file Determine file type
3 wc Print newline, word, and byte counts for each file
4 dos2unix DOS/MAC to UNIX and vice versa text file format converter
5 unix2dos DOS/MAC to UNIX and vice versa text file format converter
6 strings Print the strings of printable characters in files
7 stat display file or file system status *
Screen Handling / Terminal Commands 1 clear Clear the terminal screen
2 captoinfo Convert a termcap description into a terminfo description
3 infotocap Convert a terminfo description into a termcap description
4 tput Initialize a terminal or query terminfo database
5 infocmp Compare or print out terminfo descriptions
6 screen Screen manager with VT100/ANSI terminal emulation
7 tmux Terminal multiplexer
8 tset Terminal initialization
9 reset Terminal initialization
10 tabs Set tabs on a terminal
11 tic The terminfo entry-description compiler
12 toe Table of (terminfo) entries
13 tty Print the file name of the terminal connected to standard input
14 stty Change and print terminal line settings
15 loadkeys load keyboard translation tables *

User and Group Management Commands 1 useradd Create a new user or update default new user information
2 usermod Modify a user account
3 userdel Delete a user account and related files
4 groupadd Create a new group
5 groupmod Modify a group definition on the system
6 groupdel Delete a group

User Information Commands 1 finger User information lookup program


2 who Show who is logged on
3 whoami Print effective userid
4 w Show who is logged on and what they are doing
5 users Print the user names of users currently logged in to the current host
6 ac Print statistics about users' connect time
7 chfn Change your finger information
8 id print real and effective user and group IDs *

Password & Group Management Commands 1 passwd Update user's authentication tokens
2 chage Change user password expiry information
3 vipw Edit the password, group, shadow-password or shadow-group file
4 vigr Edit the password, group, shadow-password or shadow-group file

Process Management Commands 1 ps Report a snapshot of the current processes


2 pstree Display a tree of processes
3 pgrep Look up or signal processes based on name and other attributes
4 top Display Linux tasks
5 kill Terminate a process
6 killall Kill processes by name
7 xkill Kill a client by its X resource
8 fuser Identify processes using files or sockets
9 init systemd system and service manager *
10 usleep sleep some number of microseconds *

Text File Viewing / Manipulation Commands 1 cat Concatenate files and print on the standard output
2 rev Reverse lines of a file or files
3 zcat Compress or expand files
4 bzcat Decompresses files to stdout
5 tac Concatenate and print files in reverse
Join lines of two files on a common field
6 join
7 more File perusal filter for crt viewing
8 zmore File perusal filter for crt viewing of compressed text
9 bzmore File perusal filter for crt viewing of bzip2 compressed text
10 less Opposite of more
11 zless File perusal filter for crt viewing of compressed text
12 bzless File perusal filter for crt viewing of bzip2 compressed text
13 head Output the first part of files
14 tail Output the last part of files
15 tee Read from standard input and write to standard output and files
16 sort Sort lines of text files
17 uniq Report or omit repeated lines
18 nl Number lines of files
19 cut Remove sections from each line of files
20 awk,gawk pattern scanning and processing language *
21 egrep print lines matching a pattern *
22 env run a program in a modified environment *
23 fgrep print lines matching a pattern *
24 findmnt find a filesystem *
25 flock manage locks from shell scripts *
26 gettext translate message *

File Permissions Commands 1 chmod Change file mode bits


2 chown Change file owner and group
3 chgrp Change group ownership
4 chattr Change file attributes on a Linux file system
5 umask The user file-creation mask is set to mode
6 setfacl Set file access control lists
7 getfacl Get file access control lists

Terminal based Text Editors 1 vi Vi IMproved, a programmers text editor


2 vim Vi IMproved, a programmers text editor
3 view Vi IMproved, a programmers text editor
4 emacs GNU project Emacs
5 nano Nano's ANOther editor, an enhanced free Pico clone
6 ed Text editor
7 red Text editor
8 sed Stream editor for filtering and transforming text
9 ex Vi IMproved, a programmers text editor

IPTables and SELinux Commands 1 iptables Administration tool for IPv4 packet filtering and NAT
2 ip6tables IPv6 packet filter administration
3 sestatus SELinux status tool
4 seinfo SELinux policy query tool

Package Management Commands 1 rpm RPM Package Manager


2 yum Yellowdog Updater Modified
3 yumex Graphical User Interface for Yum
Package manager for Debian
4 dpkg
5 apt-cache
6 apt-get
7 aptitude

CD / DVD Writing Commands and Programs 1 cdrecord Write data to optical disk media
2 dvdrecord Write data to optical disk media
3 wodim Write data to optical disk media
4 eject Eject removable media

Multimedia based Programs 1 mpg123 Play audio MPEG 1.0/2.0/2.5 stream (layers 1, 2 and 3)
2 mplayer Movie player
3 mencoder Movie encoder
4 ffmpeg FFmpeg video converter
5 ffmpeg2dirac Command-line converter to create Dirac and Ogg Vorbis files
6 ffmpeg2theora Command-line converter to create Dirac and Ogg Vorbis files

Hardware Device Informations 1 lspci List all PCI devices


2 lscpu CPU architecture information helper
3 lshw List hardware
4 lshal List Hardware Abstraction Layer devices
5 dmidecode DMI table decoder
6 cat /proc/cpuinfo Getting CPU information from /proc filesystem
7 cat /proc/devices Getting Device information from /proc filesystem

Memory Information Commands 1 free Display amount of free and used memory in the system
2 cat /proc/meminfo Getting Memory information from /proc filesystem
3 vmstat Report virtual memory statistics

USB Device Information 1 lsusb List USB devices


2 usb-devices Print USB device details
Disk Usage / Directory View Status 1 df Report file system disk space usage
2 du Estimate file space usage
3 kdirstat Graphical Directory Statistics for Used Disk Space
4 tree List contents of directories in a tree-like format

LVM and RAID Commands 1 fsadm Utility to resize or check filesystem on a device
2 lvchange Change attributes of a logical volume
3 lvconvert Convert a logical volume from linear to mirror or snapshot
4 lvcreate Create a logical volume in an existing volume group
5 lvdisplay Display attributes of a logical volume
6 lvextend Extend the size of a logical volume
7 lvm LVM2 tools
8 lvmchange Change attributes of the logical volume manager
9 lvmconf LVM configuration modifier
10 lvmdiskscan Scan for all devices visible to LVM2
11 lvmdump Create lvm2 information dumps for diagnostic purposes
12 lvmsadc LVM system activity data collector
13 lvmsar LVM system activity reporter
14 lvreduce Reduce the size of a logical volume
15 lvremove Remove a logical volume
16 lvrename Rename a logical volume
17 lvresize Resize a logical volume
18 lvs Report information about logical volumes
19 lvscan Scan (all disks) for logical volumes
20 pvchange Change attributes of a physical volume
21 pvck Check physical volume metadata
22 pvcreate Initialize a disk or partition for use by LVM
23 pvdisplay Display attributes of a physical volume
24 pvmove Move physical extents
25 pvremove Remove a physical volume
26 pvresize Resize a disk or partition in use by LVM2
27 pvs Report information about physical volumes
28 pvscan Scan all disks for physical volumes
29 vgcfgbackup Backup volume group descriptor area
30 vgcfgrestore Restore volume group descriptor area
31 vgchange Change attributes of a volume group
32 vgck Check volume group metadata
33 vgconvert Convert volume group metadata format
34 vgcreate Create a volume group
35 vgdisplay Display attributes of volume groups
36 vgexport Make volume groups unknown to the system
37 vgextend Add physical volumes to a volume group
38 vgimport Make exported volume groups known to the system
39 vgimportclone Import and rename duplicated volume group
40 vgmerge Merge two volume groups
41 vgmknodes Recreate volume group directory and logical volume special files
42 vgreduce Reduce a volume group
43 vgremove Remove a volume group
44 vgrename Rename a volume group
45 vgs Report information about volume groups
46 vgscan Scan all disks for volume groups and rebuild caches
47 vgsplit Split a volume group into two
48 mdadm Manage MD devices aka Linux Software RAID
49 mdmon Monitor MD external metadata arrays

Samba (Windows File Sharing) Commands 1 smbpasswd Change a user´s SMB password
2 smbstatus Report on current Samba connections
3 smbclient ftp-like client to access SMB/CIFS resources on servers
4 smbcacls Set or get ACLs on an NT file or directory names
5 smbget wget-like utility for download files over SMB
6 smbprint
7 smbspool Send a print file to an SMB printer
Shell script for backing up SMB/CIFS shares directly to UNIX tape
8 smbtar drives
9 smbtree A text based smb network browser
List info about machines that respond to SMB name queries on a
10 findsmb subnet
11 nmblookup NetBIOS over TCP/IP client used to lookup NetBIOS names
12 rpcclient Tool for executing client side MS-RPC functions
13 sharesec Set or get share ACLs
14 mksmbpasswd.sh
15 eventlogadm Push records into the Samba event log store

LDAP Commands 1 ldapadd LDAP modify entry and LDAP add entry tools
2 ldap-agent SNMP agent for Directory Server
3 ldap-agent-bin -
4 ldapcompare LDAP compare tool
5 ldapdelete LDAP delete entry tool
6 ldapexop Issue LDAP extended operations
7 ldapmodify LDAP modify entry and LDAP add entry tools
8 ldapmodrdn LDAP rename entry tool
9 ldappasswd Change the password of an LDAP entry
10 ldapsearch LDAP search tool
11 ldapurl LDAP URL formatting tool
12 ldapwhoami LDAP who am i? tool
13 cert2ldap Import a certificate into an LDAP server
14 slapd Stand-alone LDAP Daemon
15 slapacl Check access to a list of attributes
16 slapadd Add entries to a SLAPD database
17 slapauth Check a list of string-represented IDs for LDAP authc/authz
18 slapcat SLAPD database to LDIF utility
19 slapd_db_archive -
20 slapd_db_checkpoint -
21 slapd_db_deadlock -
22 slapd_db_dump -
23 slapd_db_hotbackup -
24 slapd_db_load -
25 slapd_db_printlog -
26 slapd_db_recover -
27 slapd_db_sql -
28 slapd_db_stat -
29 slapd_db_upgrade -
30 slapd_db_verify -
Check a list of string-represented LDAP DNs based on schema
31 slapdn syntax
32 slapindex Reindex entries in a SLAPD database
33 slappasswd OpenLDAP password utility
34 slapschema SLAPD in-database schema checking utility
35 slaptest Check the suitability of the OpenLDAP slapd.conf file
36 ns-slapd The main Directory Server daemon

Networking Commands 1 ping Send ICMP ECHO_REQUEST to network hosts


2 arping Send ARP REQUEST to a neighbour host
3 route Show / manipulate the IP routing table
4 tracepath Traces path to a network host discovering MTU along this path
5 traceroute Print the route packets trace to network host
6 rdisc Network router discovery daemon
7 clockdiff Measure clock difference between hosts
8 ifenslave Attach and detach slave network devices to a bonding device
9 arp Manipulate the system ARP cache
10 dig DNS lookup utility
11 host DNS lookup utility host -t mx linuxpert.in
12 hostname Show or set the system's host name
13 domainname Show or set the system's NIS/YP domain name
14 dnsdomainname Show the system's DNS domain name
Print network connections, routing tables, interface statistics,
15 netstat masquerade connections, and multicast memberships
16 cbq Class Based Queueing
17 ss Another utility to investigate sockets
18 rtacct Network statistics tools
19 nstat Network statistics tools
20 lnstat Unified linux network statistics
21 arpd Userspace arp daemon
22 rtmon Listens to and monitors RTnetlink
23 tc Show / manipulate traffic control settings
24 whois Client for the whois service
25 ipcalc perform simple manipulation of IP addresses *
26 nc,ncat Concatenate and redirect sockets *

Network Interface Specific Commands 1 ifconfig Configure a network interface


2 ifup Bring a network interface up
3 ifdown Take a network interface down
4 mii-tool View, manipulate media-independent interface status
5 ethtool Display or change ethernet card settings
6 ether-wake A tool to send a Wake-On-LAN "Magic Packet"
7 ip Show / manipulate routing, devices, policy routing and tunnels
8 ifcfg Simplistic script which replaces ifconfig IP managment
9 dnsdomainname show the system's DNS domain name *
10 ypdomainname show or set the system's NIS/YP domain name *

Filesystem Creation / Modification /


Checking / Repairing Commands 1 mke2fs Create an ext2/ext3/ext4 filesystem
2 mkfs Build a Linux file system
3 mkfs.ext2 Create an ext2 filesystem
4 mkfs.ext3 Create an ext3 filesystem
5 mkfs.ext4 Create an ext4 filesystem
6 mkfs.ext4dev Create an ext4dev filesystem
7 mkdosfs Create an MS-DOS file system under Linux
8 mkfs.msdos Create an MS-DOS file system under Linux
9 mkfs.vfat Create an FAT32 file system under Linux
10 mkfs.ntfs Create an NTFS file system
11 resize2fs ext2/ext3/ext4 file system resizer
Create ISO9660/Joliet/HFS filesystem with optional Rock Ridge
12 mkisofs attributes
13 mkfifo Make FIFOs (named pipes)
14 mkswap Set up a Linux swap area
15 tune2fs Adjust tunable filesystem parameters on ext2/ext3/ext4 filesystems
16 chattr Change file attributes on a Linux file system
17 lsattr List file attributes on a Linux second extended file system
18 e2freefrag Report free space fragmentation information
19 filefrag Report on file fragmentation
Create a lost+found directory on a mounted Linux second extended
20 mklost+found file system
21 e2fsck Check a Linux ext2/ext3/ext4 file system
22 fsck Check and repair a Linux file system
23 fsck.ext2 Check a Linux ext2 file system
24 fsck.ext3 Check a Linux ext3 file system
25 fsck.ext4 Check a Linux ext4 file system
26 fsck.ext4dev Check a Linux ext4dev file system
27 fsck.msdos Check and repair MS-DOS file systems
28 fsck.vfat Check and repair VFAT file systems
29 badblocks Search a device for bad blocks
30 debugfs ext2/ext3/ext4 file system debugger
31 dumpe2fs Dump ext2/ext3/ext4 filesystem information
32 e2image Save critical ext2/ext3/ext4 filesystem metadata to a file
33 e2label Change the label on an ext2/ext3/ext4 filesystem
34 e2undo Replay an undo log for an ext2/ext3/ext4 filesystem
35 logsave Save the output of a command in a logfile

NTFS Filesystem Specific Commands 1 lowntfs-3g Third Generation Read/Write NTFS Driver
2 ntfs-3g Third Generation Read/Write NTFS Driver
3 ntfs-3g.probe Probe an NTFS volume mountability
4 ntfs-3g.secaudit NTFS Security Data Auditing
5 ntfs-3g.usermap NTFS Building a User Mapping File
6 ntfsmount Third Generation Read/Write NTFS Driver
7 mount.lowntfs-3g Third Generation Read/Write NTFS Driver
8 mount.ntfs-3g Third Generation Read/Write NTFS Driver
9 mount.ntfs-fuse Third Generation Read/Write NTFS Driver
10 ntfscat Print NTFS files and streams on the standard output
11 ntfsck
12 ntfsclone Efficiently clone, image, restore or rescue an NTFS
13 ntfscluster Identify files in a specified region of an NTFS volume
14 ntfscmp Compare two NTFS filesystems and tell the differences
15 ntfscp Copy file to an NTFS volume
16 ntfsdecrypt
17 ntfsdump_logfile
Fix common errors and force Windows to check NTFS
18 ntfsfix
19 ntfsinfo Dump a file's attributes
20 ntfslabel Display / Change the label on an ntfs file system
21 ntfsls List directory contents on an NTFS filesystem
22 ntfsmftalloc
23 ntfsmount
24 ntfsmove
25 ntfsresize Resize an NTFS filesystem without data loss
26 ntfstruncate
27 ntfsundelete Recover a deleted file from an NTFS volume
28 ntfswipe

Partition Information Commands 1 blkid Locate/print block device attributes


2 cat /etc/fstab Prints Partition and Filesystem Information

GRUB Bootloader Commands 1 grub


2 grubby
3 grub-crypt
4 grub-install
5 grub-md5-crypt
6 grub-terminfo

GNU `tar' saves many files together into a single tape or disk
Archive, Backup, Restore Commands 1 tar archive, and can restore individual files from the archive
2 cpio copy files to and from archives
3 rsync A fast, versatile, remote (and local) file-copying tool
4 dump ext2/3/4 filesystem backup
5 restore Restore files or file systems from backups made with dump
6 split Split a file into pieces
GNU `tar' saves many files into a single disk archive/can restore
7 gtar files *

Compression / Decompression 1 zip


2 unzip
3 compress
4 uncompress
5 unrar
6 gzip
7 gunzip
8 bzip2
9 bzip2recover
10 bunzip2
11 xz
12 unxz
13 lzma
14 unlzma
15 mksquashfs
16 unsquashfs

Help / Information Specific Commands 1 man


2 info
3 which
4 whatis
5 whereis

Find / Search 1 find


2 locate

Kernel Information / Management Utilities 1 uname


2 dmesg
3 lsb_release
4 cat /proc/cmdline
5 lsmod
6 cat /proc/modules
7 modinfo
8 insmod
9 rmmod
10 modprobe
11 mknod
12 arch
13 uptime
14 mkinitrd

Data Recovery 1 photorec


2 testdisk
3 gpart

CLI / GUI Partition Tools 1 fdisk


2 sfdisk
3 gparted
4 cfdisk

Remote Login / Remote Access 1 telnet


2 ssh
3 ssh-keygen
4 rlogin
5 sshfs

GNU Library Specific Commands 1 ldd


2 ldconfig

GNU Build Tools 1 gcc


2 g++
3 gdb
4 autoconf
5 automake
6 configure
7 make
8 install

CUPS / Printing Specific Commands 1 cancel.cups


2 cupstestdsc
3 cupstestppd
4 lp.cups
5 lpoptions
6 lppasswd
7 lpq.cups
8 lpr.cups
9 lprm.cups
10 lpstat.cups
11 ppdc
12 ppdhtml
13 ppdi
14 ppdmerge
15 ppdpo
16 accept
17 cupsaccept
18 cupsaddsmb
19 cupsctl
20 cupsd
21 cupsdisable
22 cupsenable
23 cupsfilter
24 cupsreject
25 lpadmin
26 lpc.cups
27 lpinfo
28 lpmove
29 reject

Log Management Commands 1 logrotate


2 logwatch

Job Scheduling 1 anacron


2 at
3 crontab

Terminal Browsers & Download Managers 1 lynx


2 elinks
3 wget
4 aria2c
5 curl
6 ftp

Internet Dialer Commands 1 wvdialconf


2 wvdial

Date / Clock / Calendar Commands 1 date


2 clock
3 cal

Mount / Unmount Commands 1 mount Mount a filesystem


2 umount Unmount file systems
3 fusermount

Sending Messages from Terminal 1 wall Send a message to everybody's terminal


2 mesg Control write access to your terminal
3 talk Talk to another user
4 write Send a message to another user

Compare and Difference, Patch 1 cmp Compare two files byte by byte
2 diff Compare files line by line
3 diff3 Compare three files line by line
4 sdiff Side-by-side merge of file differences
5 patch Apply a diff file to an original

Dictionary and Spell Checker 1 look Display lines beginning with a given string
2 ispell

RCS Commands 1 ci
2 co
3 ident
4 merge
5 rcs
6 rcsclean
7 rcsdiff
8 rcsfreeze
9 rcsmerge
10 rlog

CVS Commands 1 cvs


2 cvsbug
3 rcs2log

Subversion Commands 1 svn


2 svnadmin
3 svnbackport
4 svnchangesince
5 svn-clean
6 svndumpfilter
7 svngettags
8 svnintegrate
9 svnlastchange
10 svnlastlog
11 svnlook
12 svnrevertlast
13 svnserve
14 svnsync
15 svnversion
16 svnversions
17 colorsvn
18 create_svnignore
19 kdesvn_build
20 kio_svn_helper

GIT Commands 1 git


2 git-receive-pack
3 git-shell
4 git-upload-archive
5 git-upload-pack

Internet 1 mail Send and receive Internet mail *

You might also like