---
# System prepended metadata

title: Linux Basic Practice 2
tags: [Linux Basic]

---

# Linux Basic Practice 2
###### tags: `Linux Basic`
## Практическая работа №2.1 Основы мониторинга OS Linux
### 1. Команда df в Linux
![](https://i.imgur.com/RR6FT7J.png)

![](https://i.imgur.com/W84xc7S.png)

![](https://i.imgur.com/05HaIz3.png)

![](https://i.imgur.com/eRmi111.png)

![](https://i.imgur.com/FO2kAXo.png)

![](https://i.imgur.com/AwSsTnc.png)

![](https://i.imgur.com/yZbyVYL.png)

![](https://i.imgur.com/EeTQOMX.png)

![](https://i.imgur.com/5ocwLu3.png)

![](https://i.imgur.com/Ufu1FAA.png)

![](https://i.imgur.com/Ch9UX06.png)

![](https://i.imgur.com/a7rntlP.png)

![](https://i.imgur.com/LXpmsYx.png)

![](https://i.imgur.com/11899YD.png)

![](https://i.imgur.com/FcL1G9M.png)

![](https://i.imgur.com/n14mnzo.png)

![](https://i.imgur.com/PUkDtHJ.png)

![](https://i.imgur.com/BnfFZFb.png)

### 2. Команда du в Linux
![](https://i.imgur.com/4wJ9WbQ.png)

![](https://i.imgur.com/xWaqQnB.png)

![](https://i.imgur.com/9HAPEuo.png)

![](https://i.imgur.com/zzWBbxI.png)

![](https://i.imgur.com/Mik3N29.png)

![](https://i.imgur.com/yalWqJ2.png)

![](https://i.imgur.com/a9Yf63Y.png)

![](https://i.imgur.com/GOVRmqz.png)

![](https://i.imgur.com/6pT3gzy.png)

![](https://i.imgur.com/kDYYNLJ.png)

![](https://i.imgur.com/iIxb0eL.png)

![](https://i.imgur.com/G33YZJQ.png)

![](https://i.imgur.com/CiZo7om.png)

![](https://i.imgur.com/mFvL8Df.png)

![](https://i.imgur.com/l6S2oOu.png)

![](https://i.imgur.com/4bbs4Cl.png)

![](https://i.imgur.com/PPByzXU.png)

![](https://i.imgur.com/xNqpeZY.png)

![](https://i.imgur.com/k5x5HpN.png)

![](https://i.imgur.com/Ixqwaq7.png)

![](https://i.imgur.com/WZI6nft.png)

![](https://i.imgur.com/9P6W3o7.png)

![](https://i.imgur.com/HUSyAEH.png)

![](https://i.imgur.com/G46OxYK.png)

![](https://i.imgur.com/mWpzn2O.png)

### 3. Команда free в Linux
![](https://i.imgur.com/r9BcKBG.png)

![](https://i.imgur.com/iBN9J9w.png)

![](https://i.imgur.com/NF29Cy2.png)

![](https://i.imgur.com/DtLIYpm.png)

![](https://i.imgur.com/LVPh1p0.png)

![](https://i.imgur.com/LDxeWpY.png)

![](https://i.imgur.com/5wWTgBl.png)

![](https://i.imgur.com/tAKaUIZ.png)

![](https://i.imgur.com/uOI9lij.png)

![](https://i.imgur.com/axQX1cZ.png)

![](https://i.imgur.com/GFLrFHN.png)

![](https://i.imgur.com/omZFndn.png)

![](https://i.imgur.com/OZ7PCHE.png)

![](https://i.imgur.com/L0h8NYI.png)

### 4. iostat
![](https://i.imgur.com/EiCsWe3.png)

![](https://i.imgur.com/7Rw9JVU.png)

![](https://i.imgur.com/HIwrVtA.png)

![](https://i.imgur.com/HeML7SY.png)

![](https://i.imgur.com/QWsLaUs.png)

![](https://i.imgur.com/cJPodxe.png)

![](https://i.imgur.com/yd0JPdU.png)

![](https://i.imgur.com/LzrcHJx.png)

![](https://i.imgur.com/gBq37vk.png)

![](https://i.imgur.com/6irrS6D.png)

![](https://i.imgur.com/tRhkXqr.png)

![](https://i.imgur.com/1ow7Mzy.png)

![](https://i.imgur.com/nNchFcH.png)

![](https://i.imgur.com/fpRrq4H.png)

![](https://i.imgur.com/PwsuGXi.png)

![](https://i.imgur.com/w0KghSZ.png)

![](https://i.imgur.com/5lB1hn8.png)

![](https://i.imgur.com/LrZ96t4.png)

![](https://i.imgur.com/VQcMZA9.png)

![](https://i.imgur.com/uscHBp7.png)

### 5. mpstat
![](https://i.imgur.com/f5mX5Ir.png)

![](https://i.imgur.com/rPv63PY.png)

![](https://i.imgur.com/tuLWqiY.png)

![](https://i.imgur.com/6iXuJoS.png)

![](https://i.imgur.com/8mt78rH.png)

![](https://i.imgur.com/fDJ94Dv.png)

![](https://i.imgur.com/U6HtiUS.png)

![](https://i.imgur.com/lAIRFnQ.png)

![](https://i.imgur.com/0fhy2sp.png)

![](https://i.imgur.com/Da6Er9H.png)

![](https://i.imgur.com/Zw3J0eD.png)

![](https://i.imgur.com/6YZBVkM.png)

### 6. vmstat 
![](https://i.imgur.com/1Pdhrou.png)

![](https://i.imgur.com/CnTS3hP.png)

![](https://i.imgur.com/k4MB374.png)

![](https://i.imgur.com/fW43BP7.png)

![](https://i.imgur.com/kmIw38I.png)

![](https://i.imgur.com/dquLmUp.png)

![](https://i.imgur.com/qUQpe22.png)

![](https://i.imgur.com/t4WgPbP.png)

![](https://i.imgur.com/2Af52Yi.png)

![](https://i.imgur.com/xTJRYwB.png)

![](https://i.imgur.com/s63YEAM.png)

![](https://i.imgur.com/M0ZZ61L.png)

![](https://i.imgur.com/YTseGYx.png)

### 7. Утилита/команда "w"
![](https://i.imgur.com/TQJicRH.png)

![](https://i.imgur.com/335Fqtx.png)

![](https://i.imgur.com/tAvjIDA.png)

![](https://i.imgur.com/1LKnsFS.png)

### 8. Утилита htop
![](https://i.imgur.com/bqjL4KQ.png)

![](https://i.imgur.com/RrPW8BZ.png)

![](https://i.imgur.com/7TGRsZX.png)

![](https://i.imgur.com/OqRLBG3.png)

![](https://i.imgur.com/u8hhZvX.png)

![](https://i.imgur.com/WjMQspb.png)

![](https://i.imgur.com/m2J42ag.png)

![](https://i.imgur.com/dHRYxAP.png)

![](https://i.imgur.com/kXO5Ma7.png)

## Практическая работа №2.2 Установка и настройка сервера SSH в Linux
Воспользуемся ip a, чтобы узнать ip сервера (ubuntu) и ip клиента (kali):
![](https://i.imgur.com/ALKjcPN.png)

![](https://i.imgur.com/SLVhajJ.png)

Проверим, что они видят друг друга:
![](https://i.imgur.com/H1c5H83.png)

![](https://i.imgur.com/r4vQE1t.png)

Установим ssh на ubuntu:
![](https://i.imgur.com/m6aS7LT.png)

![](https://i.imgur.com/k6TrY56.png)

Проверим наличие ssh на kali и включим его:
![](https://i.imgur.com/MJt1EOr.png)

Выведем конфигурацию демона:
![](https://i.imgur.com/ajrTwFs.png)

После установки ssh на ubuntu (сервер) настроим конфигурацию ssh на сервере:
![](https://i.imgur.com/iNFivtj.png)

![](https://i.imgur.com/de9v7uG.png)

![](https://i.imgur.com/IX59mOC.png)

Перезапустим сервис ssh и посмотрим статус, чтобы убедиться, что сервис запущен с нужными настройками:
![](https://i.imgur.com/sUOb7Tq.png)

Отредактируем файл /etc/ssh/ssh_config:
![](https://i.imgur.com/9U9mPch.png)

![](https://i.imgur.com/XR38kAN.png)

Перезапустим:
![](https://i.imgur.com/7HssBnG.png)

Создадим нового пользователя (не root) на сервере, чтобы можно было подключиться к нему с клиента:
![](https://i.imgur.com/HAdNZit.png)

Подключимся с клиента к серверу к обычному пользователю:
![](https://i.imgur.com/c4ft7Hc.png)

![](https://i.imgur.com/r3zm2BI.png)

![](https://i.imgur.com/lqSgqR8.png)

![](https://i.imgur.com/SA7FOkY.png)

![](https://i.imgur.com/f8E6qc7.png)

Подключимся через Putty к ubuntu:
![](https://i.imgur.com/HoY50ip.png)

## Практическая работа №2.3 Установка и настройка SSH-authorized_keys
Сгенерируем ключи на kali:
![](https://i.imgur.com/BVVaW67.png)

Далее скопируем ключ на наш сервер Ubuntu:
![](https://i.imgur.com/mbw915f.png)

Зайдём на сервер с использованием ключей SSH:
![](https://i.imgur.com/rzJFXcS.png)

Отключим аутентификацию с помощью пароля на сервере:
![](https://i.imgur.com/tPqWUG3.png)

![](https://i.imgur.com/EgH2SmJ.png)

![](https://i.imgur.com/ppZU0bj.png)

(Тут другой ip, так как после я несколько поменял настройки в сетевых адаптерах виртуальной машины ubuntu)
![](https://i.imgur.com/EF4hir8.png)

Попробуем зайти ещё раз, чтобы удостовериться, что всё ещё можно выполнить аутентификацию без пароля:
![](https://i.imgur.com/JO9k7mM.png)

## Практическая работа №2.4 Сбор информации о Linux и WGET
### 1.Базовый сбор информации
![](https://i.imgur.com/K8xgBuX.png)

![](https://i.imgur.com/SNkmC3w.png)

### 2.Суидные файлы
![](https://i.imgur.com/3WbLOfb.png)

![](https://i.imgur.com/hqigVv9.png)

![](https://i.imgur.com/5CvkAKx.png)

![](https://i.imgur.com/n0qeD1y.png)

![](https://i.imgur.com/0wQWFY7.png)

![](https://i.imgur.com/4m6q7SQ.png)

![](https://i.imgur.com/bTDNwoI.png)

![](https://i.imgur.com/kIoHnl4.png)

![](https://i.imgur.com/AbCprS1.png)

### 3. Проверка целостностей пакетов
![](https://i.imgur.com/6ByanmL.png)

![](https://i.imgur.com/wvNV9rn.png)

![](https://i.imgur.com/gcUc7IV.png)

![](https://i.imgur.com/YXYwsSb.png)

![](https://i.imgur.com/WPHqeA0.png)

![](https://i.imgur.com/0QFxek3.png)

![](https://i.imgur.com/vJlRRcJ.png)

![](https://i.imgur.com/9idzinF.png)

## Практическая работа №2.5 Переменные окружения в Linux .bashrc, .bash_profile и .bash_login

![](https://i.imgur.com/9AhdBuT.png)

![](https://i.imgur.com/MCGMNIi.png)

![](https://i.imgur.com/53iVcIT.png)

![](https://i.imgur.com/xWveO1K.png)

### Установка и удаление локальных переменных окружения
![](https://i.imgur.com/R90UoXB.png)

### Добавление и удаление пользовательских переменных
![](https://i.imgur.com/e3QfmPQ.png)

![](https://i.imgur.com/Khq2OqR.png)

![](https://i.imgur.com/FWbIMZn.png)
![](https://i.imgur.com/yhCmAeI.png)

### Создание и удаление системных переменных окружения
![](https://i.imgur.com/lnvlzvS.png)

![](https://i.imgur.com/njwDRlM.png)













