Описание на русском тут
- Part 1. OS installation
- Part 2. Creating a user
- Part 3. OS Network Setup
- Part 4. OS Update
- Part 5. Using the sudo command
- Part 6. Installing and configuring the Time Service
- Part 7. Installing and using text editors
- Part 8. Installation and basic configuration of the SSHD service
- Part 9. Installing and using top, htop utilities
- Part 10. Using the fdisk utility
- Part 11. Using the df utility
- Part 12. Using the du utility
- Part 13. Installing and using the ncdu utility
- Part 14. Working with system logs
- Part 15. Using the CRON Task Scheduler
- Installing Ubuntu 20.04 Server LTS.
- Output of the Ubuntu version using the
cat /etc/issuecommand :
- Create a new user
admin:
-
Adding the user
adminto the 'adm` group -
We output users with the command
cat /etc/passwd, look at the presence of the useradminthere:
lois an interface that allows programs to access through a local host or send data to themselves. This is useful for testing and setting up network functions.DHCPis a network protocol for dynamically configuring network parameters. It was created so that you do not have to manually set IP, DNS, and so on for each device.- First, go to the *** superuser*** so as not to type
sudoevery time and use it further in all tasks. - Use
ip routeto get the gateway address, set static parameters in the file/etc/netplan/*.yaml, apply the changesnetplan apply, reboot the machinereboot, check that the specified parameters are preserved. - Ping 1.1.1.1 and ya.ru:
- Check for
apt update' updates, installapt upgrade`:
sudois used to execute commands on behalf of the superuser. The superuser has full control over the system.- Add the user
adminto the `sudo' group and switch to it, change the hostname. Result:
- If auto-synchronization of time is not enabled, turn it on. Result:
- VIM, to exit with saving :wq
- NANO, to exit with saving
Ctrl + O
- MCEDIT, to exit with saving
Esc + 0,Y
- VIM, to exit without saving
:q!
- NANO, to exit without saving
Ctrl + X,N
- MCEDIT, to exit without saving
Esc + 0,N
- VIM, search for
/jenniffrand replace:s/jenniffr/21 School 21/g
- NANO, search for
Ctrl + Wand replaceCtrl +\
- MCEDIT, search for
Esc + 7and replaceEsc + 4
- Install ssh, add it to autorun, look at running processes using
ps -ef- ps: running processes
- -e: processes of all users
- -f: complete information about each process
- Using
netstat -tannetstat- disables network connections
-t- TCP connections only-a- display all connections-n- display addresses and addresses in numerical representation, without converting to names
- Command output:
Proto- Connection protocol.Recv-Q- The number of bytes waiting to be read from the socket.Send-Q- The number of bytes waiting to be sent over the socket.- `Local Address' - The local IP address and port.
- `Foreign Address' - Local IP address and port.
- `State' - The state of the connection.
- The address
0.0.0.0means "all addresses on this device".
- Output
top:
- uptime = 46 min
- number of authorized users = 1
- total system load = 0.00
- total number of processes = 95
- CPU usage = 0.00
- memory usage = 146.9
- pid of the process taking up the most memory = 657
- pid of the process taking up the most CPU time = 1559
-
'htop` screenshots:
- sorted by PID, PERCENT_CPU, PERCENT_MEM, TIME
- filtered for the sshd process
- with the syslog process found using the search
- with added output of hostname, clock and uptime
- Using the
fdisk -lcommand, we will find out:- Disk name = /dev/sda
- Size = 10GiB
- SECTORS = 20971520
- Using the
dfcommand, we find out the data about the root partition (measured in kilobytes (K))
- partition size = 8408452
- the size of the OCCUPIED SPACE = 2594036
- free space size = 5365700
- percentage of usage = 33%
- Using the
df -Thcommand, we find out the data about the root partition (measured in gigabytes (G))
- partition size = 8.1
- occupied space size = 2.5
- free space size = 5.2
- percentage of usage = 33%
- file system type = ext4"
- Output of
ducommands:
- Output the contents of
/var/log/*
- Output folder sizes using
ncdu
/home
/var
/var/log
-
Last login = Jan 25 07:04 , user = jenniffr, login method = tty1
-
Restart SSHd:
- Add uptime to the task list every 2 minutes. Log output + cron task list:
- Deleting all tasks from cron:
If you're reading this, know this: you're doing great)
Thank you for your time.






































