Linux Commands Summary
Commands
Command
Description
alias
Simplify commands
apropos
Search for related commands
arch
Check computer architecture
arp
Query IPs in the same subnet
at
Set task execution time
atd
Execute scheduled tasks
awk
Process specific pattern strings
a2p
Convert to Perl file
badblocks
Check for bad blocks
bc
Run calculator
biff
Check mail reception with sound
bg
Set background
bind
Bind keys or function sequences
break
Exit a loop
cal
Check calendar
bubuiltin
Check internal commands
case
Process conditional clauses
cat
View file on screen
cd
Change directory
cfdisk
Configure disk
chattr
Change file attributes
chfn
Change user information
chgrp
Change file/directory group ownership
chmod
Change file permissions
chown
Change file owner
chsh
Change assigned shell
cksum
Check CRC value
clear
Clear terminal screen
clock
Adjust CMOS time
cmp
Compare files
colcrt
Character conversion filter
colrm
Delete columns
column
Horizontal alignment
comm
Compare and output files
command
Verify commands
continue
Continue loop
cp
Copy files
cpio
Create backup copies
crontab
Manage cron
csplit
Set format and rules for files
curl
Download/upload data via HTTP (command line data transfer tool)
cut
Output only required fields
date
Check date
dd
Read and write block devices
debugfs
Debug ext2 file system
declare
Declare variables
df
Check file system usage
dirs
Display directory list
dmesg
Check boot messages
dnsdomainname
Print DNS name
domainname
Print and set NIS name
du
Check directory and file sizes
dumpe2fs
Check file system information
echo
Standard output
eject
Eject device
elm
Mail related
enable
Specify internal commands
env
Print environment variables
eval
Read arguments
exec
Execute shell commands
exit
Exit
expand
Convert tabs to spaces
export
Set variables
e2fsck
Repair file system
fc
Receive specified editor
fdformat
Format floppy disk
fdisk
Partition disk
fg
Start specified job as foreground process
file
Check file type
find
Search for files
finger
Check user information
fold
Format text
fmt
Format text
for
Execute loop
free
Check memory usage
fsck
Check file system
fstab
Store static file system information
ftp
File transfer program
fuser
Print process ID
getkeycodes
Print mapping table
grep
Search for specific strings
gzexe
Compress executable files
gzip
Compress files
halt
Shut down system
hash
Remember/index
head
Output beginning of file
help
Show help
host
Check host information
history
Check command history
hostname
Query server name
id
Check account information
if
Execute conditional statement
ifconfig
Assign address to network card
imolamod
Install module
inetd
Top-level daemon for internet services
init
Set run level
ispell
Check spelling
jobs
Check running processes
kbd_mode
Print keyboard mode
kill
Force terminate process
klogd
Kernel log daemon for force termination
ldd
Check shared library dependencies
less
Output page by page
let
Express regular expressions
lilo
Boot
ln
Create links
locate
Find files matching pattern
login
Log in
logger
Record system logs
logname
Show user login name
logout
Exit login shell
look
Search for specific words
losetup
Check duplicate devices
lpd
Print daemon
lpq
Print current print job status
lpr
lprm
Delete documents in queue
ls
List directory contents
lsattr
Show file system attributes
lsdev
Print hardware devices
lsmod
Print module information
lnsmod
Load module
rmmod
Unload module
Mail related
make
Compile
man
View manual
mattrib
Change MS-DOS file attributes
mbadblocks
Check hard disk bad blocks
mcd
Change MS-DOS directory
mcopy
Copy files between Linux and DOS
mdel
Check server model in Linux
mdeltree
Delete MS-DOS files
mdirmesg
Check if messages can be received
mformat
Format MS-DOS file system disk
mkdir
Create directory
mke2fs
Create file system
mkfs
Create file system
mknod
Create special files
mkswap
Set swap area
mlabel
Change file system label
mmd
Create MS-DOS file system directory
mount
Assign device to specific file/folder
more
Output screen by screen
mrd
Delete MS-DOS file system directory
mutt
Mail related
mv
Move files
netstat
Check current network status
nice
Change process priority
od
View file in octal
passwd
Enter password
pidof
Find process ID of running program
pine
Mail related
ping
Check network
popd
Cancel pushd
ps
Check process status
pstree
Check process relationships
pwd
Check absolute path
quota
Check disk quota
rarp
Manage rarp table
rcp
Copy files to remote host
rdev
Inspect and set root, swap device, RAM size, video mode
rdate
Set time via network
reboot
Reboot
readonly
Mark as read-only
renice
Change process priority
reset
Reset terminal
restore
Restore data
rlogin
Direct login
rm
Delete files
rmdir
Delete directory
route
Add/delete routing table
rpm
Add/remove programs
rpm2cpio
Convert rpm to cpio
rsh
Execute commands remotely
rup
Print host status
rusers
Print users logged into host
rwall
Broadcast message to host users
rz
PC -> Server (Download files from server using ZMODEM)
script
Record
set
Set variable values
setup
Configure system settings
showmount
Show host mount information
shutdown
Power off
sleep
Pause briefly
source
Interpret script
split
Split files
ssh
Encrypted remote login
stty
Show terminal line settings
su
Switch account
suspend
Suspend shell
swapoff
Disable swap
swapon
Enable swap
sync
Reset buffer
syslogd
Configure login process
sz
Server -> PC (Send files to server using ZMODEM)
tac
View in reverse
tail
Output end of document
talk
Chat
tar
Bundle files
tcpdchk
Configure tcp wrapper
tcpmatch
Predict network requests
tee
Create standard output from standard input
telnet
Remote access
test
Test
times
Print user and system time in shell
top
Show CPU process status
tr
Replace strings
true
Return exit code
type
View type
ul
Display with underline
ulimit
Set limits
umask
Set mask mode
umount
Disconnect device
unalias
Remove alias
uname
View system information
unexpand
Convert spaces to tabs
uniq
Find duplicate lines
useradd
Create user account
userdel
Delete account
usermod
Modify user account information
unset
Unset configured variable
uptime
Check system load average
users
Check logged-in users
w
Check status of users connected to the system
wait
Wait for process
wall
Send message to all users
wc
Count characters, words, and lines
whatis
View brief description of command
while
Loop command
who
Check users
write
Send simple message on console
xcopy
Copy repeatedly
ypchfn
chfn command used in NIS
ypchsh
chsh command used in NIS
yppasswd
passwd command used in NIS
zcat
View compressed file
zcmp
Compare compressed files
zforce
Force create gz file
zgrep
Run grep on compressed files
zmore
Run more on compressed files
znew
Recompress .Z file to .gz
Options
-h (--human-readable)
Convert to human-readable format
--max-dept=1
Set depth ex) du -h --max-depth=1
-l
To see the information in the long list format
Examples
grep -o 'price:[0-9]+' ./FILE.csv >> ../RESULT.txt
Find the numeric part after price: in FILE.csv and save it to RESULT.txt
grep -o -i 'price:' RESULT.txt | wc -l
Print total count of price in RESULT.txt file
awk 'a[$1] == "" { a[$1]="X" } END { print length(a) }' RESULT.txt
Print count of non-duplicate lines in RESULT.txt file
Last updated