Diferență între revizuiri ale paginii „OS Lab 1 - Installing Linux”
(Pagină nouă: = Intro to OS — Lab 1 (Guide): Installing Linux (Ubuntu 24.04 LTS) = This laboratory establishes the working environment for the remainder of the course. By the end, you will ha...) |
|||
| Linia 1: | Linia 1: | ||
| − | |||
| − | |||
This laboratory establishes the working environment for the remainder of the course. By the end, you will have a clean Ubuntu 24.04 LTS virtual machine, a shell-first workflow via Windows Terminal using SSH, and two verification screenshots. | This laboratory establishes the working environment for the remainder of the course. By the end, you will have a clean Ubuntu 24.04 LTS virtual machine, a shell-first workflow via Windows Terminal using SSH, and two verification screenshots. | ||
| − | + | = Expanded introduction = | |
| − | + | == Linux (course context) == | |
Linux is a kernel that manages hardware resources and provides core services such as process scheduling, memory management, and device I/O. In practice, learners interact with complete GNU/Linux distributions that combine the Linux kernel with user-space tooling, a package manager, and configuration defaults. In this course, most activities occur in the '''POSIX shell environment''' with GNU/Linux extensions because this is the most direct setting for exploring processes, filesystems, permissions, pipelines, and scripting. The shell and standard utilities are defined by the POSIX specifications to promote portability across Unix-like systems (see the references below). | Linux is a kernel that manages hardware resources and provides core services such as process scheduling, memory management, and device I/O. In practice, learners interact with complete GNU/Linux distributions that combine the Linux kernel with user-space tooling, a package manager, and configuration defaults. In this course, most activities occur in the '''POSIX shell environment''' with GNU/Linux extensions because this is the most direct setting for exploring processes, filesystems, permissions, pipelines, and scripting. The shell and standard utilities are defined by the POSIX specifications to promote portability across Unix-like systems (see the references below). | ||
| − | + | == Ubuntu and distributions == | |
Ubuntu is a widely used GNU/Linux distribution that emphasizes sensible defaults, extensive package repositories, and strong hardware and cloud support. It is a pragmatic choice for instruction because it balances stability with access to current toolchains and documentation. | Ubuntu is a widely used GNU/Linux distribution that emphasizes sensible defaults, extensive package repositories, and strong hardware and cloud support. It is a pragmatic choice for instruction because it balances stability with access to current toolchains and documentation. | ||
| − | + | == Ubuntu LTS releases == | |
Ubuntu provides two release types: interim releases on a 6‑month cadence and '''Long-Term Support (LTS)''' releases every two years. LTS releases receive five years of standard security updates, with optional extended coverage through Ubuntu Pro/ESM. Ubuntu 24.04 LTS ("Noble Numbat") has standard support through April 2029. This stability reduces environmental drift during a semester and simplifies troubleshooting and grading. | Ubuntu provides two release types: interim releases on a 6‑month cadence and '''Long-Term Support (LTS)''' releases every two years. LTS releases receive five years of standard security updates, with optional extended coverage through Ubuntu Pro/ESM. Ubuntu 24.04 LTS ("Noble Numbat") has standard support through April 2029. This stability reduces environmental drift during a semester and simplifies troubleshooting and grading. | ||
| − | + | == Virtual machines for teaching == | |
A virtual machine provides an isolated, reproducible environment. You can experiment freely, take snapshots, and return to a known state when needed. This approach minimizes host-specific issues and keeps attention on operating-systems concepts. | A virtual machine provides an isolated, reproducible environment. You can experiment freely, take snapshots, and return to a known state when needed. This approach minimizes host-specific issues and keeps attention on operating-systems concepts. | ||
| − | + | == Why the GUI appears only once == | |
After initial verification, work proceeds primarily in the shell. This aligns the lab activities with the course focus and reduces overhead. The Ubuntu desktop is used only to confirm a successful installation and to capture one required screenshot. | After initial verification, work proceeds primarily in the shell. This aligns the lab activities with the course focus and reduces overhead. The Ubuntu desktop is used only to confirm a successful installation and to capture one required screenshot. | ||
| − | + | = Objectives and deliverables = | |
;You will: | ;You will: | ||
| Linia 37: | Linia 35: | ||
* VirtualBox, Ubuntu 24.04 LTS Desktop ISO, and Windows Terminal installed. | * VirtualBox, Ubuntu 24.04 LTS Desktop ISO, and Windows Terminal installed. | ||
| − | + | = Installation (external tutorial) = | |
Follow this tutorial to create the VM and install Ubuntu 24.04 LTS in VirtualBox on Windows. When finished, return to this guide for the post‑installation steps. | Follow this tutorial to create the VM and install Ubuntu 24.04 LTS in VirtualBox on Windows. When finished, return to this guide for the post‑installation steps. | ||
| Linia 45: | Linia 43: | ||
''Networking choice during VM creation: use '''Bridged Adapter''' so the VM obtains a LAN IP address, which simplifies SSH from Windows Terminal.'' | ''Networking choice during VM creation: use '''Bridged Adapter''' so the VM obtains a LAN IP address, which simplifies SSH from Windows Terminal.'' | ||
| − | + | = Post-installation: one-time GUI verification and update = | |
# Log in to the Ubuntu desktop. | # Log in to the Ubuntu desktop. | ||
| Linia 61: | Linia 59: | ||
You will install ''fastfetch'' shortly and take the first screenshot. | You will install ''fastfetch'' shortly and take the first screenshot. | ||
| − | + | = Terminal primer = | |
The following commands will be used frequently throughout the course. | The following commands will be used frequently throughout the course. | ||
| Linia 102: | Linia 100: | ||
</pre> | </pre> | ||
| − | + | = Enable SSH in Ubuntu (inside the VM) = | |
Install and start the SSH server: | Install and start the SSH server: | ||
| Linia 121: | Linia 119: | ||
</pre> | </pre> | ||
| − | + | = Install and run fastfetch (inside the VM) = | |
''fastfetch'' provides a concise system overview (OS, kernel, CPU, memory, GPU). | ''fastfetch'' provides a concise system overview (OS, kernel, CPU, memory, GPU). | ||
| Linia 131: | Linia 129: | ||
</pre> | </pre> | ||
| − | + | = Windows Terminal + SSH (primary workflow) = | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Open '''Windows Terminal''' (PowerShell profile), then connect to the VM: | Open '''Windows Terminal''' (PowerShell profile), then connect to the VM: | ||
| Linia 155: | Linia 146: | ||
fastfetch | fastfetch | ||
</pre> | </pre> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
''Optional: create a Windows Terminal profile that launches <code>ssh youruser@VM_IP</code> for quicker access in future labs.'' | ''Optional: create a Windows Terminal profile that launches <code>ssh youruser@VM_IP</code> for quicker access in future labs.'' | ||
| − | + | = Submission = | |
Upload both images to the '''Lab 1''' assignment in the LMS: | Upload both images to the '''Lab 1''' assignment in the LMS: | ||
| Linia 170: | Linia 155: | ||
* <code>fastfetch_ssh_<yourname>.png</code> | * <code>fastfetch_ssh_<yourname>.png</code> | ||
| − | + | = Focused troubleshooting = | |
;VM offers only 32-bit or fails to start | ;VM offers only 32-bit or fails to start | ||
| Linia 194: | Linia 179: | ||
</pre> | </pre> | ||
| − | + | = References = | |
* Ubuntu release cycle and support windows (including 24.04 LTS): [https://ubuntu.com/about/release-cycle Ubuntu Release Cycle]. | * Ubuntu release cycle and support windows (including 24.04 LTS): [https://ubuntu.com/about/release-cycle Ubuntu Release Cycle]. | ||
* Ubuntu 24.04 LTS support horizon (standard support through April 2029): [https://ubuntu.com/about/release-cycle Ubuntu Release Cycle] and vendor communications. | * Ubuntu 24.04 LTS support horizon (standard support through April 2029): [https://ubuntu.com/about/release-cycle Ubuntu Release Cycle] and vendor communications. | ||
* POSIX shell and utilities overview: [https://pubs.opengroup.org/onlinepubs/9699919799/ The Open Group Base Specifications Issue 7, 2018 edition]. | * POSIX shell and utilities overview: [https://pubs.opengroup.org/onlinepubs/9699919799/ The Open Group Base Specifications Issue 7, 2018 edition]. | ||
* Installation walkthrough used for this lab: [https://automaticaddison.com/how-to-install-ubuntu-24-04-virtual-machine-on-a-windows-pc/ How to Install Ubuntu 24.04 Virtual Machine on a Windows PC] (Automatic Addison). | * Installation walkthrough used for this lab: [https://automaticaddison.com/how-to-install-ubuntu-24-04-virtual-machine-on-a-windows-pc/ How to Install Ubuntu 24.04 Virtual Machine on a Windows PC] (Automatic Addison). | ||
Versiunea curentă din 3 octombrie 2025 13:41
This laboratory establishes the working environment for the remainder of the course. By the end, you will have a clean Ubuntu 24.04 LTS virtual machine, a shell-first workflow via Windows Terminal using SSH, and two verification screenshots.
Expanded introduction
Linux (course context)
Linux is a kernel that manages hardware resources and provides core services such as process scheduling, memory management, and device I/O. In practice, learners interact with complete GNU/Linux distributions that combine the Linux kernel with user-space tooling, a package manager, and configuration defaults. In this course, most activities occur in the POSIX shell environment with GNU/Linux extensions because this is the most direct setting for exploring processes, filesystems, permissions, pipelines, and scripting. The shell and standard utilities are defined by the POSIX specifications to promote portability across Unix-like systems (see the references below).
Ubuntu and distributions
Ubuntu is a widely used GNU/Linux distribution that emphasizes sensible defaults, extensive package repositories, and strong hardware and cloud support. It is a pragmatic choice for instruction because it balances stability with access to current toolchains and documentation.
Ubuntu LTS releases
Ubuntu provides two release types: interim releases on a 6‑month cadence and Long-Term Support (LTS) releases every two years. LTS releases receive five years of standard security updates, with optional extended coverage through Ubuntu Pro/ESM. Ubuntu 24.04 LTS ("Noble Numbat") has standard support through April 2029. This stability reduces environmental drift during a semester and simplifies troubleshooting and grading.
Virtual machines for teaching
A virtual machine provides an isolated, reproducible environment. You can experiment freely, take snapshots, and return to a known state when needed. This approach minimizes host-specific issues and keeps attention on operating-systems concepts.
Why the GUI appears only once
After initial verification, work proceeds primarily in the shell. This aligns the lab activities with the course focus and reduces overhead. The Ubuntu desktop is used only to confirm a successful installation and to capture one required screenshot.
Objectives and deliverables
- You will
- Provision Ubuntu 24.04 LTS in VirtualBox on Windows (via the referenced installation guide).
- Perform a brief post-install verification in the Ubuntu GUI.
- Enable SSH on the VM and connect from Windows Terminal.
- Install and run fastfetch to verify system details.
- Submit to the LMS
- Screenshot #1: fastfetch running in the Ubuntu GUI Terminal.
- Screenshot #2: fastfetch running in Windows Terminal after SSH into the VM.
- Host prerequisites (Windows 10/11)
- Virtualization enabled (Task Manager → Performance → CPU → Virtualization: Enabled).
- ~30 GB free disk; ≥8 GB RAM (allocate ≥4 GB to the VM).
- VirtualBox, Ubuntu 24.04 LTS Desktop ISO, and Windows Terminal installed.
Installation (external tutorial)
Follow this tutorial to create the VM and install Ubuntu 24.04 LTS in VirtualBox on Windows. When finished, return to this guide for the post‑installation steps.
- How to Install Ubuntu 24.04 Virtual Machine on a Windows PC (Automatic Addison).
Networking choice during VM creation: use Bridged Adapter so the VM obtains a LAN IP address, which simplifies SSH from Windows Terminal.
Post-installation: one-time GUI verification and update
- Log in to the Ubuntu desktop.
- Open Terminal (Activities → search "Terminal").
- Verify basic network connectivity:
ping -c 2 ubuntu.com
- Update the system:
sudo apt update sudo apt upgrade -y
You will install fastfetch shortly and take the first screenshot.
Terminal primer
The following commands will be used frequently throughout the course.
- Help and documentation
command --help man command # press q to quit
- Navigation and files
pwd ls -la cd ~/; mkdir lab1 && cd lab1 touch notes.txt nano notes.txt # Ctrl+O (save), Enter, Ctrl+X (exit) cp notes.txt notes.bak mv notes.txt notes.md rm -i notes.bak
- Viewing and searching
ls -la | less less /etc/os-release grep -n "NAME" /etc/os-release
- Processes
ps aux | less top
- Packages
sudo apt update apt-cache search curl
Enable SSH in Ubuntu (inside the VM)
Install and start the SSH server:
sudo apt update sudo apt install -y openssh-server sudo systemctl enable --now ssh sudo systemctl status ssh # should indicate "active (running)"
Determine the VM’s IP address (assuming Bridged networking):
hostname -I # select the LAN IPv4 address (e.g., 192.168.x.y) # or: ip -br a # locate the UP interface (e.g., enp0s3) and its IPv4 address
Install and run fastfetch (inside the VM)
fastfetch provides a concise system overview (OS, kernel, CPU, memory, GPU).
sudo apt update sudo apt install -y fastfetch fastfetch
Windows Terminal + SSH (primary workflow)
Open Windows Terminal (PowerShell profile), then connect to the VM:
ssh youruser@VM_IP
On first connection, accept the host key (type yes) and enter your Ubuntu password.
Verify and run:
whoami hostname -I fastfetch
Optional: create a Windows Terminal profile that launches ssh youruser@VM_IP for quicker access in future labs.
Submission
Upload both images to the Lab 1 assignment in the LMS:
fastfetch_gui_<yourname>.pngfastfetch_ssh_<yourname>.png
Focused troubleshooting
- VM offers only 32-bit or fails to start
- Enable Intel VT-x/AMD-V in BIOS/UEFI. Ensure that no other hypervisor is reserving hardware virtualization.
- No network or cannot SSH
- VirtualBox → VM Settings → Network → Adapter 1: Bridged Adapter.
- In Ubuntu:
ip -br a # confirm an IPv4 address is assigned systemctl status ssh # should be active (running) sudo systemctl restart ssh ping -c 2 8.8.8.8 # basic connectivity check
- Authentication issues
- Use the username created during installation and re-enter the password carefully (no characters echo in the terminal).
- fastfetch not found
sudo apt update sudo apt install -y fastfetch
References
- Ubuntu release cycle and support windows (including 24.04 LTS): Ubuntu Release Cycle.
- Ubuntu 24.04 LTS support horizon (standard support through April 2029): Ubuntu Release Cycle and vendor communications.
- POSIX shell and utilities overview: The Open Group Base Specifications Issue 7, 2018 edition.
- Installation walkthrough used for this lab: How to Install Ubuntu 24.04 Virtual Machine on a Windows PC (Automatic Addison).