  
 


       ,      ,    IT-.    20   :   Linux     , ,  , ,   .

     ,  -   ,   firewall,   Ansible.    ,    .    DevOps-, SRE-   .

  ,     ,   ,         .      ,         .





 

  





 1.     




  (SysAdmin)  ,   ,

,    IT- .

      ,   ,  ,

    , ,   .



1.1.    



   :



 ,      (Linux, Windows Server)

   ,    

     

       (DR)

    (hardening, , )

      (DNS, DHCP, VPN, proxy)

    (, Ansible, IaC)

  , runbooks  

    (on-call)  post-mortem 



        .

   : Linux Admin, Network Admin, Cloud Engineer,

SRE, Platform Engineer, Security Engineer.



1.2. Soft skills,  



  ,  . :



      (  )

    ( production  3  )

   (  )

  (,      )

       



1.3.   / 



     

      

   (, )   

      

   

     



1.4.     



  :



 16     (, CLI, , )

 711      

 1214    

 1519    (, , , DevOps)

 20        



 .   :

 VirtualBox / VMware / Proxmox   

   (Ubuntu Server + Rocky Linux)

   tier  



1.5.    



 man pages  --help    

    (docs.ubuntu.com, docs.fedoraproject.org)

 Arch Wiki (    Arch   )

 Linux Journey, OverTheWire (Bandit)   

 : UNIX and Linux System Administration Handbook






 2.  : LINUX  WINDOWS SERVER




       .

  : Linux ( Unix-)  Windows Server.



2.1. Linux:   



Linux   .  =  +   +

  +   + community/.



  :



Ubuntu Server

:  , LTS 5 ,  community, snap/apt

:    

 :  -, , 



Debian

: ,  ,  

:    

 :  ,   



Rocky Linux / AlmaLinux (RHEL-)

: enterprise-, 10  , dnf, SELinux

:   

 :  ,   



SUSE Linux Enterprise / openSUSE Leap

   ,  YaST, btrfs  



: Fedora Server (bleeding edge), Amazon Linux, Oracle Linux



2.2.     



1.      ?

2.     (RHEL, SUSE, Ubuntu Pro)?

3.      ?

4.    security-

5.     (AD,   ..)



2.3. Windows Server    



Windows Server     , :

 Active Directory / Group Policy

 Exchange, SharePoint, MSSQL

 .NET-  IIS

 Hyper-V 

    Microsoft-



 : Domain Controller, File Server, RDS, IIS, WSUS, Hyper-V.

     PowerShell Core   (Windows Containers).



 Linux  :

  PowerShell

   Active Directory (   )

 RDP   Group Policy



2.4.      



 :

 Linux  ,  (PostgreSQL/MySQL), , CI/CD, 

 Windows  ,  ,  , legacy

    managed-   



        .



2.5.    



  :

    (    )

   

   SSH-,    root

   security- (   )

   hostname     (chrony/NTP)






 3.   LINUX   




CLI     .

  GUI  ,      SSH.



3.1.     



pwd                     #  

ls -la                  #   ( )

ls -lh --sort=size      #  , 

cd /var/log             # 

cd -                    #    

cd ~                    #  



mkdir -p /opt/app/{bin,config,logs}

cp -a source/ dest/     #   (, )

mv oldname newname

rm -rf dir/             # !  

find /var -name "*.log" -mtime +30

find / -type f -size +100M 2>/dev/null



3.2.    



cat file.txt

less file.txt           #   (, /, q)

head -n 50 file

tail -n 100 file

tail -f /var/log/syslog #      



grep -i "error" /var/log/syslog

grep -R "password" /etc/ 2>/dev/null

grep -E "error|fail|critical" app.log



#  :  

grep -i error /var/log/syslog | \

awk '{print $5}' | sort | uniq -c | sort -nr | head



3.3.    (,   . 5)



ls -l

chmod 755 script.sh

chmod u+x script.sh

chown user:group file

chown -R app:app /opt/app



3.4. 



nano file.conf          # ,  

vim file.conf           # ,   



  vim:

i            

Esc          

:w          

:q          

:wq / ZZ      

:q!           

/pattern    

dd           

yy + p         



3.5.  



Debian / Ubuntu:

sudo apt update

sudo apt upgrade

sudo apt install nginx

sudo apt remove nginx

sudo apt autoremove

apt search keyword

apt show nginx

apt-cache policy nginx



RHEL / Rocky / Alma:

sudo dnf check-update

sudo dnf update

sudo dnf install nginx

sudo dnf remove nginx

dnf search keyword

dnf info nginx

dnf history



3.6.  



history | grep ssh

Ctrl+R          #    

!!              #   

sudo !!         #   sudo

command | tee file.txt   #   ,   

command > file 2>&1      # stdout + stderr  

nohup long_command &     #    

screen / tmux            # ,    



3.7.    CLI



      ,   

    rm -rf, dd, mkfs, > /dev/sda

 ,      (whoami, id)

      dry-run  






 4.     




    .    ,

,      .



4.1.   



lsblk -f                #   +  + UUID

fdisk -l

blkid

cat /proc/partitions

smartctl -a /dev/sda    # SMART- ( smartmontools)



 :

/dev/sda, /dev/sdb       SATA/SCSI

/dev/nvme0n1            NVMe

/dev/vda                  (KVM/cloud)

/dev/mapper/...         LVM, multipath



4.2.  



GPT () vs MBR (,  2 ).



sudo parted /dev/sdb

(parted) mklabel gpt

(parted) mkpart primary ext4 0% 100%

(parted) print

(parted) quit



:

sudo fdisk /dev/sdb



4.3.  



ext4          

XFS            (  /)

Btrfs   snapshots, , checksums (openSUSE,  NAS)




  .


   .

   ,     (https://www.litres.ru/book/uchitel-nachalnoy/kurs-sistemnogo-administratora-74541262/)  .

      Visa, MasterCard, Maestro,    ,   ,     ,  PayPal, WebMoney, ., QIWI ,       .


