<Mina Magdy>
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
3. sudo apt full-upgrade | upgradeing Thems & GUI & Icons
4. sudo apt apt update | sudo apt full-upgrade 1&2
5. sudo apt autoremove | Deletion of old files after updating
6. sudo apt search | earching for a specific package inside the
Linux repositories
| Basic Linux Commands |
<Part 2>
FI LES & NAVI GATI NG
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
1. pwd | print word directory
2. mkdir NEW FILE NAME | make directory
3. rm dir FILE NAME | delete file
4. rm –f | fore delete
5. rm –rf | delete directory file
6. manually Options
7. man ls
| Basic Linux Commands |
<Part 2>
F I L E S & N AV I G AT I N G
1. tail | show top 10 lines
2. W C | 1 8 1 8 9 4 M 3 LO M AT. T XT
<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
4. mv FILE1 To FILE2 | To Move Files
5. mv FILE1 To FILEE | To Rename File
6. touch | Create New text File
7. cat | To open Text File
| Basic Linux Commands |
<Part 3>
NETWORKI NG
1. ping HOST | ping host
2. whois DNS | get whois for domain
3. dig DNS | get DNS for domain
4. dig –x HOST | reserve lookup host
4. wget FILE | download file
5. wget -r URL | download file from url
| Basic Linux Commands |
<Part 4>
PROCESSES
1. ps
2. ps aux
3. PID
4. kill PID
5. Kill all proc
6. htop & top >> sudo apt install htop
7. tree >> sudo apt install tree
| Basic Linux Commands |
< Pa r t 5 >
SYSTEM INFO
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|
• Every file an d directory in you r UNI X/ Lin u x system h as
followin g 3 permission s defin ed for all th e 3 own ers
discu ssed above.
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|
1. chmod +rwx filename
to add permission s.
2. chmod -rwx directoryname
to remove 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
2. su do service apatch e2 stop | to stop apatch e service
3. su do service apatch e2 restart| to restart apatch e service
4. su do service apatch e2 statu es | sh ow apatch e statu es
5. To Down loadin g file h ttp: / / 192.168.1.5/ m3lomat1.txt
| Basic Linux Commands |
<Part 8>
LI UNX SERVI CES
|SSH|
1. ssh user@host | connect to host as user
2. ssh –p port user@host | connect using P
3. ssh –D user@host | connect & use bind P
| Basic Linux Commands |
<Part 8>
L I U N X S E RV I C E S
|FTP|
1. ft p D N S . c o m | D o m a i n N a m e S y s t e m
1. ft p I P | I n t e rn e t Pro t o c o l
2. ft p U S E R @ FT P D O M A I N . C O M
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