You are on page 1of 1

Important Linux Commands

pwd
cd
cd /etc
cd ~ (to go to user's home directory)
clear
man
whereis
whatis
ls
ls -l
ls -a
cp
mv
mkdir
rmdir
touch
rm
tar -xvzf (for tar.gz)
tar -xvjf (for tar.bz2)
pwd
ifconfig
locate
chmod 777 filename (r=4,w=2,x=1)
find /home/username -name 'filename'
grep string
grep -i 'string' (-i for case insensitive)
ps
kill pid (process id obtained from ps command)
kill -9 pid (to enforce termination if normal kill does not terminate the process)
uname
uname -a
cat
su
yum install firefox
yum install gcc-c++
su -c yum install gcc-c++ (then write password for root access - for this command only)
yum remove firefox
yum update firefox
yum list firefox
yum list installed
yum list installed | grep gcc
yum search firefox
yum info firefox
git
vi Editor
vi hello.cpp
i for insert mode, to write into the file, Esc to remove insert mode
Shift-zz (ZZ) to save and quit.

You might also like