Linux Commands
Linux Commands
A • dd Data Duplicator - convert and copy a file, • pathchk Check file name portability • ifup Start a network interface up T
• adduser Used to add user to the system write disk headers, boot records • Perf Performance analysis tools for Linux • import Capture an X server screen and • tail Output the last part of a file
• addgroup Used to add group to the system • ddrescue Data recovery tool • ping Test a network connection save the image to file • tar Store, list or extract files in an archive
• addr 2line convert addresses into file names and line numbers • declare Declare variables and give them attributes • pgrep List processes by name • install Copy files and set attributes • tee Redirect output to multiple files
• alias Create an alias for Linux commands • df Display free disk space • pkill Kill processes by name • iostat Report CPU and i/o statistics • test Evaluate a conditional expression
• anacron Used to run commands periodically. • diff Display the differences between two files • popd Restore the previous value of the current directory • ip Routing, devices and tunnels • time Measure Program running time
• apropos Search the manual pages. • diff3 Show differences among three files • pr Prepare files for printing • timeout Run a command with a time limit
• apt Search and install software packages (Debian/Ubuntu) • dig DNS lookup • printcap Printer capability database J • times User and system times
• apt get Search and install software packages (Debian/Ubuntu) • dir Briefly list directory contents • printenv Print environment variables • jobs List active jobs • tmux Terminal multiplexer
• arp Display and modify ARP table. • dircolors Colour setup for 'ls' • printf Format and print data • join Join lines on a common field • touch Change file timestamps
• ar A utility to create/modify/extract from archives.
• aspell Interactive spell checker.
• dirname Convert a full pathname to just a path
• dirs Display list of remembered directories
• ps
• pushd
Process status
Save and then change the current directory
K • top List processes running on the system
• tput Set terminal-dependent capabilities, color, position
• kill Kill a process by specifying its PID
• as A portable GNU assembler. • dos2unix Windows/MAC to UNIX text file format converter • pv Monitor the progress of data through a pipe • killall Kill processes by name • traceroute Trace Route to Host
• at Schedule a command to run once at a particular time • dmesg Print kernel & driver messages • pwd Print Working Directory • trap Execute a command when the shell receives a signal
• awk Find and Replace text, database sort/validate/index • dpkg Package manager (Debian/Ubuntu).
Q L • tr Translate, squeeze, and/or delete characters
• du Estimate file space usage • less Display output one screen at a time • true Do nothing, successfully
B • quota Display disk usage and limits • let Perform arithmetic on shell variables • tsort Topological sort
• basename Strip directory and suffix from filenames E • quotacheck Scan a file system for disk usage • link Create a link to a file • tty Print filename of terminal on stdin
• base32 Base32 encode/decode data and print to standard output • echo Display message on screen •
• base64 Base64 encode/decode data and print to standard output • egrep Search file(s) for lines that match an extended expression R • ln Create a symbolic link to a file
• local Create a function variable
• type Describe a command
• bash GNU Bourne-Again SHell • eject Eject removable media • ram ram disk device
• rar Archive files with compression • locate Find files U
• bc Access the GNU bc calculator utility. • enable Enable and disable builtin shell commands • • logname Print current login name • ulimit Limit user resources
• bg Send processes to the background. • env Environment variables • rcp Copy files between two machines • umask Users file creation mask
• read Read a line from standard input • logout Exit a login shell •
• bind Used to attach a name to a socket. • ethtool Ethernet card settings • look Display lines beginning with a given string • umount Unmount a device
• break Used to break from a loop. • eval Evaluate several commands/arguments • readarray Read from stdin into an array variable • unalias Remove an alias
• readonly Mark variables/functions as readonly • lpc Line printer control program
• builtin Run a shell builtin • exec Execute a command • lpr Print files • uname Print system information
• bzip2 Compress or decompress named file(s) • exit Exit the shell • reboot Reboot the system • unexpand Convert spaces to tabs
• rename Rename files • lprint Print a file
• bzcmp Used to call the cmp program for bzip2 compressed files. • expand Convert tabs to spaces • lprintd Delete a print job • uniq Uniquify files
• bzdiff Used to call the diff program for bzip2 compressed files. • export Set an environment variable • renice Alter priority of running processes • units Convert units from one scale to another
• remsync Synchronize remote files via email • lprintq List the print queue
• bzgrep Used to call grep for bzip2 compressed files. • expr Evaluate expressions • lprm Remove jobs from the print queue • unix2dos UNIX to Windows or MAC text file format converter
• bzip2 A block-sorting file compressor used to shrink given files. • return Exit a shell function • unrar Extract files from a rar archive
• bzless Used to apply ‘less’ to bzip2 compressed files. F • rev Reverse lines of a file • lsattr List file attributes on a Linux second extended file system
• lsblk List block devices • unset Remove variable or function names
• bzmore Used to apply ‘more’ to bzip2 compressed files. • false Do nothing, unsuccessfully • rm Remove files • unshar Unpack shell archive scripts
• fdformat Low-level format a floppy disk • rmdir Remove folder(s) • ls List information about file(s)
• until Execute commands (until error)
C • fdisk Partition table manipulator for Linux • rsync Remote file copy (Synchronize file trees) • lsof List open files
• lspci List all PCI devices • uptime Show uptime
• cal Show calendar • fg Send job to foreground
• caller Return the context of any active subroutine call • fgrep Search file(s) for lines that match a fixed string S M
• useradd
• userdel
Create new user account
Delete a user account
• case Conditionally execute a command by matching a pattern. • file Determine file type • screen Multiplex terminal, run remote shells via ssh
• scp Secure copy (remote file copy) • make Recompile a group of programs • usermod Modify user account
• cat Concatenate and print (display) the content of files • find Search for files that meet a desired criteria • man Help manual • users List users currently logged in
• cc GNU C and C++ compiler. • fmt Reformat paragraph text • sdiff Merge two files interactively
• sed Stream Editor • mapfile Read lines from standard input into an • uuencode Encode a binary file
• cd Change Directory • fold Wrap text to fit a specified width indexed array variable • uudecode Decode a file created by uuencode
• cfdisk Partition table manipulator for Linux • for Expand words, and execute commands • select Accept user choices via keyboard input
• mkdir Create new folder(s)
• chattr Change file attributes on a Linux file system • format Format disks or tapes • seq Print numeric sequences
• set Manipulate shell variables and functions • mkfifo Make FIFOs (named pipes) V
• chgrp Change group ownership • free Display memory usage • mkfile Make a file •v Verbosely list directory contents ('ls -l -b')
• chmod Change access permissions • fsck File system consistency check and repair • sftp Secure File Transfer Program • vdir Verbosely list directory contents ('ls -l -b')
• shift Shift positional parameters • mkisofs Create a hybrid ISO9660/JOLIET/HFS filesystem
• chown Change file owner and group • ftp File Transfer Protocol • mknod Make block or character special files • vi Text Editor
@xtremepentest
• chpasswd Update passwords in batch mode • function Define Function Macros • shopt Shell Options • vmstat Report virtual memory statistics
• shuf Generate random permutations • mktemp Make a temporary file
• chfn Used to change real user name and information. • fuser Identify/kill the process that is accessing a file
• chroot Run a command with a different root directory • shutdown Shutdown or restart linux • more Display output one screen at a time W
• chsh Switch login shell. G • sleep Delay for a specified time • most Browse or page through a text file
• mount Mount a file system
•w Show who is logged on and what they are doing
• chkconfig System services (runlevel) • gawk Find and Replace text within file(s) • slocate Find files • wait Wait for a process to complete •
• getopts Parse positional parameters • sort Sort text files • mtools Manipulate MS-DOS files • watch Execute/display a program periodically
• cksum Print CRC checksum and byte counts • mtr Network diagnostics (traceroute/ping)
• clear Clear terminal screen • grep Search file(s) for lines that match a given pattern • source Run commands from a file • wc Print byte, word, and line counts
• groupadd Add a user security group • split Split a file into fixed-size pieces • mv Move or rename files or directories • whereis Search the user's $path, man pages and source files for a program
• cmp Compare two files • mmv Mass Move and rename (files)
• comm Compare two sorted files line by line • groupdel Delete a group • ss Socket Statistics • which Search the user's $path for a program file
• command Run a command - ignoring shell functions • groupmod Modify a group
• groups Print group names a user is in
• ssh Secure Shell client (remote login program)
• stat Display file or file system status
N • while Execute commands
• who Print all usernames currently logged in
• compress Used to compress one or more file(s). • nc Netcat, read and write data across networks
• continue Resume the next iteration of a loop • gzip Compress or decompress named file(s) • strace Trace system calls and signals • netstat Networking connections/stats • whoami Print the current user id and name ('id -un')
• su Substitute user identity • wget Retrieve web pages or files via HTTP, HTTPS or FTP
• cp Copy one or more files to another location
• cpio Copy files to and from archives
H • sudo Execute a command as another user
• nft nftables for packet filtering and classification
• nice Set the priority of a command or job • write Send a message to another user
• hash Remember the full pathname of a name argument • sum Print a checksum for a file
• cron Daemon to execute scheduled commands
• crontab Schedule a command to run at a later time
• head Output the first part of file(s) • suspend Suspend execution of this shell
• nl
• nohup
Number lines and write files
Run a command immune to hangups
XYZ
• help Display help for a built-in command • • sync Synchronize data on disk with memory • xargs Execute utility, passing constructed argument list(s)
• csplit Split a file into context-determined pieces • history Command History • notify-send Send desktop notifications • xdg-open Open a file or URL in the user's preferred application.
• curl Transfer data from or to a server
• cut Divide a file into several parts
• hostname Print or set system name I • nslookup Query Internet name servers interactively • xxd Make a hexdump or do the reverse
• htop Interactive process viewer • iconv Convert the character set of a file O • xz Compress or decompress .xz and .lzma files
D P • id
• if
Print user and group id's
Conditionally perform a command
• open Open a file in its default application • yes Print a string until interrupted
• zip Package and compress (archive) files
• date Display or change the date & time • passwd Modify a user password • op Operator access
• dc Desk Calculator • ifconfig Configure a network interface • !! Run the last command again •& Start a new process in the background
• paste Merge lines of files • ifdown Stop a network interface •. Run a command script in the current shell
•# Comment s