{"id":20504911,"url":"https://github.com/drveles/linux_1","last_synced_at":"2026-06-10T09:31:56.897Z","repository":{"id":233906637,"uuid":"788010071","full_name":"drveles/linux_1","owner":"drveles","description":"Installing and configuring ubuntu server on a virtual machine","archived":false,"fork":false,"pushed_at":"2024-04-17T17:01:54.000Z","size":18843,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T20:56:57.725Z","etag":null,"topics":["linux","server","virtual-machine"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drveles.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-17T15:53:20.000Z","updated_at":"2024-07-12T08:20:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"37e43b16-fc7a-4341-b9a0-fc7d54735e94","html_url":"https://github.com/drveles/linux_1","commit_stats":null,"previous_names":["drveles/linux_server_1","drveles/linux_1"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/drveles/linux_1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drveles%2Flinux_1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drveles%2Flinux_1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drveles%2Flinux_1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drveles%2Flinux_1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drveles","download_url":"https://codeload.github.com/drveles/linux_1/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drveles%2Flinux_1/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34146871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux","server","virtual-machine"],"created_at":"2024-11-15T19:41:18.470Z","updated_at":"2026-06-10T09:31:56.872Z","avatar_url":"https://github.com/drveles.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Welcome to **Linux**!\nОписание на русском [тут](./README_RUS.md)\n\n1. [Part 1. OS installation](#part-1-installing-the-os)\n2. [Part 2. Creating a user](#part-2-creating-a-user)\n3. [Part 3. OS Network Setup](#part-3-configuring-the-os-network)\n4. [Part 4. OS Update](#part-4-os-update)\n5. [Part 5. Using the sudo command](#part-5-using-the-sudo-command)\n6. [Part 6. Installing and configuring the Time Service](#part-6-installing-and-configuring-the-time-service)\n7. [Part 7. Installing and using text editors](#part-7-installing-and-using-text-editors-vim-nano-mcedit)\n8. [Part 8. Installation and basic configuration of the SSHD service](#part-8-installation-and-basic-configuration-of-the-sshd-service)\n9. [Part 9. Installing and using top, htop utilities](#part-9-installing-and-using-the-top-htop-utilities)\n10. [Part 10. Using the fdisk utility](#part-10-using-the-fdisk-utility)\n11. [Part 11. Using the df utility](#part-11-using-the-df-utility)\n12. [Part 12. Using the du utility](#part-12-using-the-du-utility)\n13. [Part 13. Installing and using the ncdu utility](#part-13-installing-and-using-the-ncdu-utility)\n14. [Part 14. Working with system logs](#part-14-working-with-system-logs)\n15. [Part 15. Using the CRON Task Scheduler](#part-15-using-the-task-scheduler-cron)\n\n\n##  Part 1. Installing the OS\n* Installing Ubuntu 20.04 Server LTS.\n* Output of the Ubuntu version using the `cat /etc/issue` command : \n\n![pic_part1_1](./misc/images/1_1.png)\n\n## Part 2. Creating a user\n* Create a new user `admin`:\n\n![pic_part2_1](./misc/images/2_1.png)\n\n* Adding the user `admin` to the 'adm` group\n\n* We output users with the command `cat /etc/passwd`, look at the presence of the user `admin` there:\n\n![pic_part2_2](./misc/images/2_2.png)\n\n## Part 3. Configuring the OS network\n* `lo` is 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.\n* `DHCP` is 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.\n* First, go to the *** superuser*** so as not to type `sudo` every time and use it further in all tasks. \n* Use `ip route` to get the gateway address, set static parameters in the file `/etc/netplan/*.yaml`, apply the changes `netplan apply`, reboot the machine `reboot`, check that the specified parameters are preserved.\n* Ping 1.1.1.1 and ya.ru: \n\n![pic_part3_1](./misc/images/3_1.png)\n![pic_part3_2](./misc/images/3_2.png)\n\n## Part 4. OS Update\n* Check for `apt update' updates, install `apt upgrade`: \n\n![pic_part4_1](./misc/images/4_1.png)\n\n## Part 5. Using the **sudo command**\n* `sudo` is used to execute commands on behalf of the superuser. The superuser has full control over the system.   \n* Add the user `admin` to the `sudo' group and switch to it, change the hostname. Result:\n\n![pic_part5_1](./misc/images/5_1.png)\n\n## Part 6. Installing and configuring the Time service\n* If auto-synchronization of time is not enabled, turn it on. Result: \n\n![pic_part6_1](./misc/images/6_1.png)\n\n## Part 7. Installing and using text editors VIM, NANO, MCEDIT\n* VIM, to exit with saving :wq\n\n![pic_part7_1](./misc/images/7_1.png)\n* NANO, to exit with saving `Ctrl + O`\n\n![pic_part7_2](./misc/images/7_2.png)\n* MCEDIT, to exit with saving `Esc + 0` , `Y`\n\n![pic_part7_3](./misc/images/7_3.png)\n\n\n* VIM, to exit without saving `:q!`\n\n![pic_part7_4](./misc/images/7_4.png)\n* NANO, to exit without saving `Ctrl + X` , `N`\n\n![pic_part7_5](./misc/images/7_5.png)\n* MCEDIT, to exit without saving `Esc + 0` , `N`\n\n![pic_part7_6](./misc/images/7_6.png)\n\n\n* VIM, search for `/jenniffr` and replace `:s/jenniffr/21 School 21/g`\n\n![pic_part7_7](./misc/images/7_7.png)\n![pic_part7_8](./misc/images/7_8.png)\n\n* NANO, search for `Ctrl + W` and replace `Ctrl +\\`\n\n![pic_part7_9](./misc/images/7_9.png)\n![pic_part7_10](./misc/images/7_10.png)\n\n* MCEDIT, search for `Esc + 7` and replace `Esc + 4`\n\n![pic_part7_11](./misc/images/7_11.png)\n![pic_part7_12](./misc/images/7_12.png)\n\n\n## Part 8. Installation and basic configuration of the SSHD service  \n* Install ssh, add it to autorun, look at running processes using `ps -ef` \n    - ps: running processes\n- -e: processes of all users\n- -f: complete information about each process\n\n![pic_part8_1](./misc/images/8_1.png)\n\n* Using `netstat -tan`\n    - `netstat` - disables network connections\n- `-t` - TCP connections only\n- `-a` - display all connections\n    - `-n` - display addresses and addresses in numerical representation, without converting to names\n\n![pic_part8_2](./misc/images/8_2.png)\n\n* Command output:\n- `Proto` - Connection protocol.\n    - `Recv-Q` - The number of bytes waiting to be read from the socket.\n    - `Send-Q` - The number of bytes waiting to be sent over the socket.\n    - `Local Address' - The local IP address and port.\n    - `Foreign Address' - Local IP address and port.\n    - `State' - The state of the connection.\n    - The address `0.0.0.0` means \"all addresses on this device\".\n\n## Part 9. Installing and using the **top**, **htop utilities**\n* Output `top`:\n- uptime = 46 min\n- number of authorized users = 1 \n  - total system load = 0.00\n- total number of processes = 95\n  - CPU usage = 0.00\n- memory usage = 146.9\n- pid of the process taking up the most memory = 657\n- pid of the process taking up the most CPU time = 1559\n\n* 'htop` screenshots: \n\n  - sorted by PID, PERCENT_CPU, PERCENT_MEM, TIME\n\n![pic_part9_1](./misc/images/9_1.png)\n![pic_part9_2](./misc/images/9_2.png)\n![pic_part9_3](./misc/images/9_3.png)\n![pic_part9_4](./misc/images/9_4.png)\n\n  - filtered for the sshd process\n\n![pic_part9_5](./misc/images/9_5.png)\n- with the syslog process found using the search \n\n![pic_part9_6](./misc/images/9_6.png)\n- with added output of hostname, clock and uptime  \n\n![pic_part9_7](./misc/images/9_7.png)\n\n## Part 10. Using the fdisk utility\n* Using the `fdisk -l` command, we will find out: \n    - Disk name = /dev/sda\n- Size = 10GiB\n    - SECTORS = 20971520\n\n![pic_part10_1](./misc/images/10_1.png)\n\n## Part 11. Using the df utility\n* Using the `df` command, we find out the data about the root partition (measured in kilobytes (K))\n- partition size = 8408452\n  - the size of the OCCUPIED SPACE = 2594036\n  - free space size = 5365700\n- percentage of usage = 33% \n* Using the `df -Th` command, we find out the data about the root partition (measured in gigabytes (G))\n- partition size = 8.1\n- occupied space size = 2.5\n- free space size = 5.2\n- percentage of usage = 33%\n- file system type = ext4\"\n\n![pic_part11_1](./misc/images/11_1.png)\n  \n## Part 12. Using the du utility\n* Output of `du` commands:\n\n![pic_part12_1](./misc/images/12_1.png)\n* Output the contents of `/var/log/*`\n\n![pic_part12_2](./misc/images/12_2.png)\n\n\n## Part 13. Installing and using the ncdu utility\n* Output folder sizes using `ncdu`\n- `/home`\n\n![pic_part13_1](./misc/images/13_1.png)\n- `/var`\n\n![pic_part13_1](./misc/images/13_2.png)\n- `/var/log`\n\n![pic_part13_1](./misc/images/13_3.png)\n## Part 14. Working with system logs\n* Last login = Jan 25 07:04 , user = jenniffr, login method = tty1\n\n* Restart SSHd: \n\n![pic_part14_1](./misc/images/14_1.png)\n\n\n## Part 15. Using the Task Scheduler **CRON**\n\n* Add uptime to the task list every 2 minutes. Log output + cron task list: \n\n![pic_part15_1](./misc/images/15_1.png)\n\n* Deleting all tasks from cron: \n\n![pic_part15_2](./misc/images/15_2.png)\n\nIf you're reading this, know this: you're doing great)\n\n\n----------------------------------------------\n***Thank you for your time.***","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrveles%2Flinux_1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrveles%2Flinux_1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrveles%2Flinux_1/lists"}