# Lab 1: Introduction to Linux

## Environment Preparation

1. Download and Install Ubuntu 22.04 LTS on your workstation as a virtual machine. It is recommended to use Virtualbox but you can use alternate solutions of your choice. You can use your host operating system if you have Ubuntu installed.
2. Keep the instance of virtual machine for future labs

## Grading requirements for all labs

- Each lab has 10 points as maximum. To pass the lab, it should have minimum 6 points.
- By the end of the course every lab should be passed
- If lab was not done/passed in time (before an official deadline), student needs to do a re-take where score can be 6 as the maximum
- On every report note the following:
  - Student’s name
  - Lab name
  - Title of the excercise
- Appropriate style of the report should include the following: screenshots from the terminal,networks schemes, commands and its parameters explanation, simple logical flow and applicable conclusions

## Exercise 1 - Finding your way around Linux

- Check the distribution of Linux you have just installed

      $ lsb_release -a

- Check the username of the user who is currently logged on to the local system

      $ whoami

- View all currently logged in users

      $ users

- View the content of your current working directory

      $ pwd

- List the content of your current directory

      $ ls -la

- Navigate to another directory

      $ cd Downloads/

  Check your current working directory again.

> A shell is a program that provides an interface for the user to interact with the operating system. It gathers input (commands) from the user, executes them, and return the output when necessary. The terminal where you type your command is a shell.

- View all shells installed on the machine

      $ cat /etc/shells

- View the shell you are currently using

      echo "$SHELL"

- Learn to read manuals with the `man` command. Read the manual of the bash shell.

      $ man bash

### Questions to answer

1. What is your machine hostname? How did you check it?
2. What distribution of Linux did you install, and what is the version?
3. What is the root directory on your machine?
4. What is the difference between `/bin/bash` and `/bin/sh`?
5. Read the manual for `bash`. List three options and describe what they do.

   > Hint: RTFM

6. Write five (5) Linux distributions you want to try. Write short notes on their purposes.
7. What is the POSIX standard?
8. What are the advantages of the POSIX standard?
9. Write the differences between Slackware and Debian.
10. Explain all the details of the output from the command `uname -a`.