200 Linux Commands For Newbbies
200 Linux Commands For Newbbies
About 200 Linux commands for serious newbies. To get more examples on how each
command is used, use this command:
#>man commandname
Where commandname is an command you pick from the table below. If no manual
exist, then that command is most likely unavailable for your Linux distro. Ignore it and
proceed with other commands.
alias
Create an alias
awk
Find and Replace text, database sort/validate/index
break
Exit from a loop
builtin
Run a shell builtin
cal
Display a calendar
case
Conditionally perform a command
cat
Display the contents of a file
cd
Change Directory
cfdisk
Partition table manipulator for Linux
chgrp
Change group onership
chmod
Change access permissions
chown
Change file oner and group
chroot
Run a command ith a different root directory
cksum
Print CRC chec!sum and byte counts
clear
Clear terminal screen
cmp
Compare to files
comm
Compare to sorted files line by line
command
Run a command " ignoring shell functions
continue
Resume the next iteration of a loop
cp
Copy one or more files to another location
cron
Daemon to execute scheduled commands
crontab
#chedule a command to run at a later time
csplit
#plit a file into context"determined pieces
cut
Divide a file into several parts
date
Display or change the date $ time
dc
Des! Calculator
dd
Data Dump " Convert and copy a file
declare
Declare variables and give them attributes
df
Display free dis! space
diff
Display the differences beteen to files
diff3
#ho differences among three files
dir
%riefly list directory contents
dircolors
Colour setup for &ls'
dirname
Convert a full pathname to (ust a path
dirs
Display list of remembered directories
du
Estimate file space usage
echo
Display message on screen
ed
) line"oriented text editor *edlin+
egrep
#earch file*s+ for lines that match an extended
expression
eject
E(ect CD"R,-
enable
Enable and disable builtin shell commands
env
Display, set, or remove environment variables
eval
Evaluate several commands/arguments
exec
Execute a command
exit
Exit the shell
expand
Convert tabs to spaces
export
#et an environment variable
expr
Evaluate expressions
factor
Print prime factors
fdformat
Lo"level format a floppy dis!
fdisk
Partition table manipulator for Linux
fgrep
#earch file*s+ for lines that match a fixed string
find
#earch for files that meet a desired criteria
fmt
Reformat paragraph text
fold
.rap text to fit a specified idth/
for
Expand ords, and execute commands
format
Format dis!s or tapes
free
Display memory usage
fsck
File system consistency chec! and repair
function
Define Function -acros
gawk
Find and Replace text ithin file*s+
getopts
Parse positional parameters
grep
#earch file*s+ for lines that match a given pattern
groups
Print group names a user is in
gzip
Compress or decompress named file*s+
hash
Remember the full pathname of a name argument
head
,utput the first part of file*s+
history
Command 0istory
hostname
Print or set system name
id
Print user and group id's
if
Conditionally perform a command
import
Capture an 1 server screen and save the image to file
info
0elp info
install
Copy files and set attributes
join
2oin lines on a common field
kill
#top a process from running
less
Display output one screen at a time
let
Perform arithmetic on shell variables
ln
-a!e lin!s beteen files
local
Create variables
locate
Find files
logname
Print current login name
logout
Exit a login shell
look
Display lines beginning ith a given string
lpc
Line printer control program
lpr
,ff line print
lprint
Print a file
lprintd
)bort a print (ob
lprintq
List the print 3ueue
lprm
Remove (obs from the print 3ueue
ls
List information about file*s+
m4
-acro processor
man
0elp manual
mkdir
Create ne folder*s+
mkfifo
-a!e F4F,s *named pipes+
mknod
-a!e bloc! or character special files
more
Display output one screen at a time
mount
-ount a file system
mtools
-anipulate -#"D,# files
mv
-ove or rename files or directories
nice
#et the priority of a command or (ob
nl
5umber lines and rite files
nohup
Run a command immune to hangups
passwd
-odify a user passord
paste
-erge lines of files
pathchk
Chec! file name portability
ping
6est a netor! connection
popd
Restore the previous value of the current directory
pr
Prepare files for printing
printcap
Printer capability database
printenv
Print environment variables
printf
Format and print data
ps
Process status
pushd
#ave and then change the current directory
pwd
Print .or!ing Directory
quota
Display dis! usage and limits
quotachec
! #can a file system for dis! usage
quotactl
#et dis! 3uotas
ram
ram dis! device
rcp
Copy files beteen to machines/
read
read a line from standard input
readonly
-ar! variables/functions as readonly
remsync
#ynchroni7e remote files via email
return
Exit a shell function
rm
Remove files
rmdir
Remove folder*s+
rpm
Remote Pac!age -anager
rsync
Remote file copy *#ynchroni7e file trees+
screen
6erminal indo manager
sdiff
-erge to files interactively
sed
#tream Editor
select
)ccept !eyboard input
seq
Print numeric se3uences
set
-anipulate shell variables and functions
shift
#hift positional parameters
shopt
#hell ,ptions
shutdown
#hutdon or restart linux
sleep
Delay for a specified time
sort
#ort text files
source
Run commands from a file &/'
split
#plit a file into fixed"si7e pieces
su
#ubstitute user identity
sum
Print a chec!sum for a file
symlink
-a!e a ne name for a file
sync
#ynchroni7e data on dis! ith memory
tac
Concatenate and rite files in reverse
tail
,utput the last part of files
tar
6ape )Rchiver
tee
Redirect output to multiple files
test
Evaluate a conditional expression
time
-easure Program running time
times
8ser and system times
touch
Change file timestamps
top
List processes running on the system
tracerout
e 6race Route to 0ost
trap
Run a command hen a signal is set*bourne+
tr
6ranslate, s3uee7e, and/or delete characters
tsort
6opological sort
tty
Print filename of terminal on stdin
type
Describe a command
ulimit
Limit user resources
umask
8sers file creation mas!
umount
8nmount a device
unalias
Remove an alias
uname
Print system information
unexpand
Convert spaces to tabs
uniq
8ni3uify files
units
Convert units from one scale to another
unset
Remove variable or function names
unshar
8npac! shell archive scripts
until
Execute commands *until error+
useradd
Create ne user account
usermod
-odify user account
users
List users currently logged in
uuencode
Encode a binary file
uudecode
Decode a file created by uuencode
v
9erbosely list directory contents *&ls "l "b'+
vdir
9erbosely list directory contents *&ls "l "b'+
vi
6ext Editor
watch
Execute/display a program periodically
wc
Print byte, ord, and line counts
whereis
Report all !non instances of a command
which
Locate a program file in the user's path/
while
Execute commands
who
Print all usernames currently logged in
whoami
Print the current user id and name *&id "un'+
xargs
Execute utility, passing constructed argument list*s+
yes
Print a string until interrupted
.period
Run commands from a file
###
Comment / Remar!
at 3:37 AM
3 comment s:
Justin said...
nice
12:49 PM
Richard said...
A couple of net commands snuck in there - ping and traceroute - and yet no sign
of other common network commands like "ethtool", "ifconfig", "netstat" or even
"telnet".
And never mind other networking commands that talk to remote machines like
"ssh", "sftp" or even just "ftp" - which I'm sure anyone dealing with more than one
local machine uses regularly.
BTW, if you throw in "rpm", you might also want to put "rpmbuild", "rpm2cpio" and
"cpio" in there if you ever deal with RPM source packages.
Also, if you want to find out what a running program is actually doing, "lsof" and
"strace" are completely invaluable, yet neither get a mention here (only "ps" and
"top", which don't give you info on what files a program is accessing or which
system calls it's making).
Here's a ramdom rundown of other common commands missing: "bzip2", "curl"
(or "wget"), "file", "ldd", "make" (like any sysadmin hasn't ever needed to build
source code?), "reset" and "stty" (especially for pesky Backspace key mapping :-)
).
And here's ones listed that are so rarely used by admins that they shouldn't be
there: "comm", "dc" (dreadful!), "ed", "factor", "info" (awful GNU doc standard -
man pages or HTML are far easier to read/use), "m4" (no-one uses this manually
from the command line surely?) and "tac".
4:11 PM
Gravis said...
Good to see a list of many commands on one page. Thanks for putting it up.