Basic Linux Commands
Basic Linux Commands
LINUX ADMINISTRATION
OSCP,SSCP,CEH,CRTP
<Linux Environment>
<env>
• Linux Environment >>> Variables
Ex1 a = 1 Ex2 b = 2 print (a+b) = 3
• All In memory “Ram”
• U Can Access To all With shell “Terminal”
• Let’s Try with “ls”
• Try “which whoami”
• echo $PATH
| Basic Linux Commands |
<Part 1>
LI NUX UPDATEI NG
1. sudo apt update | Connect with Linux servers & show update
2. sudo apt upgrade | Switch the old bundle to the new one
1. ls | List Files
2. ls –l
3. ls –al
4. cd | To move between files | Ch an ge Directory
5. cd DI R NAME
6. cd ..
| Basic Linux Commands |
<Part 2>
F I L E S & N AV I G AT I N G
<GREP>
g e r p , e g re p , f g re p , rg re p – p r i n t l i n e s t h a t m a t c h
1. c a t M 3 LO M AT. T XT | g re p “ W O R D ”
2. m a n g re p
| Basic Linux Commands |
<Part 2>
F I L E S & N AV I G AT I N G
1. cp | copy
2. cp FILE1 To FILE2
3. mv | move
1. ps
2. ps aux
3. PID
4. kill PID
1. date
2. uptime
3. whoami
4. cat /proc/cpuimfo
5. cat /proc/meminfo
6. free
7. du
8. du –sh
9. df
10. df -h
| Basic Linux Commands |
<Part 6>
SYSTEM INFO
<uname>
1. uname
2. uname -a | show kernel Version
3. uname -n | kali
4. uname -s | Linux
5. uname -m | x86_64
6. uname -r | 5.9.0-kali-amd64
7. man uname | to show more options
| Basic Linux Commands |
<Part 7>
PERMI SSI ONS
|Permissions|
1. Read -r
2. Write -w
3. Execu te -x
| Basic Linux Commands |
<Part 7>
PERMI SSI ONS
1 . r = re a d p e rm i s s i o n
2 . w = w r i t e p e rm i s s i o n
3 . x = exe c u t e p e rm i s s i o n
4 . - = n o p e rm i s s i o n
| Basic Linux Commands |
<Part 7>
PERMISSIONS
| Permission s|
3. chmod +x filename
to allow execu table permission s.
4. chmod -wx
filename to take ou t write an d execu table permission s.
| Basic Linux Commands |
<Part 7>
PERMI SSI ONS
| User Den otation s|
u user/owner
g group
o other
a all
| Basic Linux Commands |
Group Others
| Basic Linux Commands |
<Part 8>
LI UNX SERVI CES
|apatche2|
1. su do service apatch e2 start | to start apatch e service
F I L E S M A N AG E
1. cd DIR
2. l c d / h o m e / u s e r / u rd i re c t o r y n a m e | D O W N LOA D I N G F I L E S W I T H FT P
3. get FILE | Download file
|Final Result|
• Linux “ENV”
• Part 1 | Linux Updating and differences on upgrading
• Part 2 | Files & Navigating
• Part 3 | Networking
• Part 4 | Process
• Part 5 | System info
• Part 7 | Permitions
• Part 8 | Linux Services
• Facebook : https://www.facebook.com/m3lomatthephone
• My YouTube Chanel : https://www.youtube.com/c/m3lomatthephone
• M3lomat the phone 2 : https://www.youtube.com/channel/UCixopZbFBzdYKk2qsZLsRCA
• M3lomat Electric : https://www.youtube.com/channel/UCGnXhX2E_MaGYOY8kyOowbQ
• Instagram : https://instagram.com/mena.m.rushdy?igshid=1xg5sxvjtek7i
• LinkedIn : https://www.linkedin.com/in/mina-magdy-38362b1b6/
• Facebook Group : https://www.facebook.com/groups/391033085092937