0% found this document useful (0 votes)
5 views

linux commands

Uploaded by

Abdullahkhasib
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

linux commands

Uploaded by

Abdullahkhasib
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

pwd : to show the current path

cd (path or file): to change directory


cd .. or exit : to go back a directory (cd ../.. for 2 etc)
sudo su : to enter the root and (exit) to leave it
echo : to print any text
whoami : to show who is the current user
ls (-a for hidden) (-l for details): to list the items in the desired directory
ls /usr/sharee/wordlists/ : shows texts that possibly contain passwords
cat : shows whats in a text file
ctrl C (^C) : to quit to terminal command
man : to show the manual for the command
mkdir : to creat a directory
rmdir : remove an emtpy directory
touch : create a file
cp : copy a file or directory
clear : to clear the terminal page
nano : is a text editor
mv : to rename a file or to move it to another directory
file : show the file type
rm : remove a file
& : allows you run commands in the back
&& : allows you to combine multiple commands in one line
| : use the output of a command as in input for another
|| : excute the command thats after only if the one before failed
kill : to terminate a command in the background
ps : to show running commands
sleep : makes the terminal sleep for a certain time
> : redirect output to the chosen file while deleting its content
>> : adds redirected output to the file without deleting its contents
2> : to store any error on the terminal in a file

* : to print all the contents


; : to use continous multiple commands
# : for comments
? : to guess unsure characters
grep : search the contents of a file for specific values
find : search for files in a directory
which : locate a command
locate : same as find but weaker
chmod : change the permission of the file or directory
useradd : add a user

You might also like