This page lists a few basic BASH commands that you should be familiar with. Remember that the man
command is your friend. Remember that you can search within manual pages (/
).
uname
– shows basic information about the system
uname -a
– show all
uname -r
– kernel release
lsb_release -a
– shows distribution specific information
ls
– list the current directory
ls -la
– long listing of all files (inc. hidden)
mv
– move/rename file
cp
– copy file
rmdir
, mkdir
– remove/create directory
rm
– remove file (use with caution!)
rm -i
– remove interactively (asks)
chmod
– change file permissions
chown
– change file group/owner
who
– show who is logged in
w
– show who is logged in and their task
last
– show listing of last logged users
top
(interactive, exit by q
)
ps
– report snapshot of current process(es). Note that it has two types of syntax, see man ps
kill
– send signal to a process
sort
uniq
awk
grep
cut
wc
wc -l
– count lines
sed
tr
These are up to some level interactive. Make sure you are at least able to edit and save a file using vim
or vi
. It is sometimes very helpful on some simpler systems.
nano
pico
vim
– has 'edit' and 'command' mode. Syntax highlight can be turned on :syn on
emacs
ssh
– secure shell
scp
– secure copy
ping
– test response of a machine (i.e.: if it is online)