Level 6 · Cloud Computing, DevOps and Cybersecurity · Course 6.1 Linux and Servers

Module 63: Introduction to Linux

Goal: understand what Linux is and why it runs most servers, get a Linux system of your own to practise on, and find your way around its terminal and file system. From here on, the question changes from "how do I build it?" to "how do I deploy, run, watch, protect and recover it?"

You'll need: a computer with at least 8 GB of RAM and 25 GB of free disk space, and Module 8's terminal skills.

Lessons

  1. 1What Linux is15–25 minutes✓
  2. 2Getting a Linux system to practise on15–25 minutes✓
  3. 3The terminal and the shell15–25 minutes✓
  4. 4The Linux file system15–25 minutes✓
  5. 5Linux and Windows, and virtual machines15–25 minutes✓

🛠️Module practice: Project A, part 1, your Linux lab

  1. An Ubuntu Server VM (or WSL) running, with a snapshot taken.
  2. A lab-notes.md (in your own Git repository) recording: distribution and kernel version, disk space, where configs and logs live, and ten commands you've learned with one-line explanations.
  3. A restore from snapshot practised once.

✅Module check

Explain in a few sentences, in your own words:

What is Linux, why do servers use it, and how should you practise on it safely?

Show a good answer

A good answer mentions: Linux is a free, open-source kernel packaged into distributions like Ubuntu; it runs most servers because it's free, stable, secure when maintained, fully controllable from the terminal and supported everywhere. It has one file tree from / with standard places (/etc config, /var/log logs, /home users), case-sensitive names, and administrator work through sudo. Practise in a VM, WSL or lab with snapshots, and test security only on systems you own or are allowed to test.

📝Module quiz

10 questions · 10 marks each · 100 marks in all · pass mark 70% · retry as often as you like ·

1. What's the difference between the Linux kernel and a distribution?

Why each option is right or wrong

  • “They're two words for the same thing, used by different companies” (Incorrect): The kernel is one part; a distribution is the whole system built around it.
  • “The kernel is the desktop; a distribution is the server version” (Incorrect): Both desktops and servers run a kernel inside a distribution.
  • “A distribution is a paid version of the free kernel” (Incorrect): Most distributions are free; they add tools, not a price.
  • “The kernel manages hardware; a distribution bundles it with tools and software” is correct.

    The kernel is the core that talks to the processor, memory and devices. A distribution, like Ubuntu or Debian, packages the kernel with a shell, utilities, a package manager and default settings, giving you a complete system.

    • Same kernel, different distros: they mostly differ in tools and update policy.
    • Servers often use: Ubuntu LTS or Debian.

📖 Revise: Lesson 1: What Linux is

Question ID module-63-q1 · Report a mistake in this question
2. Why does an LTS version matter for a server?

Why each option is right or wrong

  • “LTS versions run programs noticeably faster than other releases” (Incorrect): Speed is similar; the benefit is long, stable support.
  • “Only LTS versions are able to run Node.js and web servers” (Incorrect): Node runs on many versions; LTS is about support length.
  • “LTS versions don't need any updates at all” (Incorrect): They still need updates; they just get them for longer.
  • “It gets security updates for years without major upgrades” is correct.

    Long-term support releases receive security fixes for around five years. A server can stay on one version, applying small updates, instead of risky major upgrades every few months.

    • Ubuntu LTS: released every two years.
    • Plan ahead: upgrade before support ends.

📖 Revise: Lesson 2: Getting a Linux system to practise on

Question ID module-63-q2 · Report a mistake in this question
3. Why practise on a VM or WSL rather than a live server?

Why each option is right or wrong

  • “Commands work differently on live servers” (Incorrect): The commands are the same; the consequences are what differ.
  • “VMs are faster than real servers for every task” (Incorrect): Speed varies; safety is the reason.
  • “Live servers don't allow any terminal access for learners” (Incorrect): They do, which is why mistakes there are costly.
  • “Mistakes harm nothing real, and snapshots allow rollback” is correct.

    Learning means breaking things: deleting files, locking yourself out, misconfiguring services. On a virtual machine or WSL, that affects no customers, and a snapshot restores a working state in seconds.

    • Take a snapshot: before risky experiments.
    • Live servers: only once you're confident with the steps.

📖 Revise: Lesson 2: Getting a Linux system to practise on

Question ID module-63-q3 · Report a mistake in this question
4. Where may you practise security testing?

Why each option is right or wrong

  • “On any public website, as long as you don't cause damage” (Incorrect): Testing without permission can be illegal even if nothing breaks.
  • “On your employer's systems, without asking first” (Incorrect): Even at work, you need explicit permission.
  • “On government sites, since they're public and paid for by taxes” (Incorrect): Public doesn't mean permitted; it's especially risky.
  • “Only on systems you own or have explicit permission to test” is correct.

    Scanning or attacking systems without permission is illegal in most countries, including under India's IT Act, even with good intentions. Use your own VMs, deliberately vulnerable practice labs, or written permission.

    • Practice labs: like intentionally vulnerable VMs or CTF platforms.
    • Get it in writing: what, when and how you may test.

📖 Revise: Lesson 1: What Linux is

Question ID module-63-q4 · Report a mistake in this question
5. What does sudo do?

Why each option is right or wrong

  • “Switches you to the root account for the rest of the session” (Incorrect): sudo raises rights for one command; it doesn't keep you signed in as root.
  • “Installs the command if it's missing from the system” (Incorrect): Installing is the package manager's job, often run with sudo.
  • “Speeds up the command by giving it more memory” (Incorrect): It changes permissions, not speed.
  • “Runs a command with administrator (root) rights” is correct.

    sudo lets an allowed user run one command as root, after confirming their password. It's logged, and you only get extra power for that command.

    • Use sparingly: most work doesn't need root.
    • Read before running: a command with sudo can damage the whole system.

📖 Revise: Lesson 3: The terminal and the shell

Question ID module-63-q5 · Report a mistake in this question
6. How do you stop a command that's running too long?

Why each option is right or wrong

  • “Press Ctrl + Z” (Incorrect): Ctrl + Z pauses it in the background; it keeps its resources until resumed or killed.
  • “Close the laptop lid” (Incorrect): That may sleep the computer but doesn't reliably stop the command.
  • “Type stop and press Enter” (Incorrect): There's no general stop command; the program may not read your typing.
  • “Press Ctrl + C” is correct.

    Ctrl + C sends an interrupt signal to the program running in the foreground, asking it to stop. Most programs stop straight away.

    • Not stopping? Try again, or use kill from another terminal.
    • Note: in a terminal, Ctrl + C doesn't copy text.

📖 Revise: Lesson 3: The terminal and the shell

Question ID module-63-q6 · Report a mistake in this question
7. Where would you look for a program's configuration files on Linux?

Why each option is right or wrong

  • “/bin” (Incorrect): /bin holds programs, not their settings.
  • “/tmp” (Incorrect): /tmp holds temporary files that may be cleared.
  • “/home” (Incorrect): /home holds users' own folders.
  • “/etc” is correct.

    By convention, system-wide configuration lives in /etc, for example /etc/nginx/nginx.conf or /etc/ssh/sshd_config.

    • Per-user settings: often in hidden files in your home folder.
    • Back up before editing: copy the file first.

📖 Revise: Lesson 4: The Linux file system

Question ID module-63-q7 · Report a mistake in this question
8. Where are logs usually kept on Linux?

Why each option is right or wrong

  • “/etc/log” (Incorrect): /etc holds configuration; logs go in /var/log.
  • “/usr/logs” (Incorrect): /usr holds installed software, not logs.
  • “/root” (Incorrect): /root is the root user's home folder.
  • “/var/log” is correct.

    /var holds data that changes, and /var/log holds log files from the system and many services, like /var/log/nginx/. Systemd's journal is read with journalctl.

    • Watch live: tail -f /var/log/....
    • Rotate: so logs don't fill the disk.

📖 Revise: Lesson 4: The Linux file system

Question ID module-63-q8 · Report a mistake in this question
9. A shell script written on Windows fails on Linux with bad interpreter. What's a likely cause?

Why each option is right or wrong

  • “Linux can't run scripts written on another computer” (Incorrect): It can; the hidden line endings are the problem.
  • “The script needs to be renamed to .exe” (Incorrect): Linux doesn't use .exe files.
  • “Bash isn't installed on any Linux system” (Incorrect): Bash is installed on most Linux systems.
  • “Windows line endings (CRLF); convert the file to LF” is correct.

    Windows ends lines with two characters, CR and LF; Linux uses only LF. The hidden CR makes the first line read as #!/bin/bash\r, a program that doesn't exist.

    • Fix: dos2unix script.sh, or set your editor to LF.
    • Git: .gitattributes can enforce LF for scripts.

📖 Revise: Lesson 5: Linux and Windows, and virtual machines

Question ID module-63-q9 · Report a mistake in this question
10. What's the main difference between a virtual machine and a container?

Why each option is right or wrong

  • “Containers can only run on Windows” (Incorrect): Containers run mainly on Linux, and elsewhere through a VM.
  • “VMs share the host's kernel; containers include a whole OS” (Incorrect): That's the wrong way round.
  • “There's no difference; the names are interchangeable” (Incorrect): They work quite differently, with different trade-offs.
  • “A VM includes a whole OS; a container shares the host's kernel” is correct.

    A virtual machine emulates hardware and runs its own operating system, which is heavier but well isolated. A container packages an app and its files but uses the host's kernel, so it starts in seconds and uses less memory.

    • Containers: great for packaging apps consistently.
    • VMs: stronger isolation, different operating systems.

📖 Revise: Lesson 5: Linux and Windows, and virtual machines

Question ID module-63-q10 · Report a mistake in this question

ProLearners Assist