2. Installation & Remote Connection
2.1 Installing Linux in a Virtual Machine
For beginners, the safest way to learn is to install Linux in a Virtual Machine, without affecting your existing system.
Recommended Tools:
- VirtualBox: free, open source, cross-platform, great for beginners
- VMware Workstation Player: free for personal use, better performance
- WSL2: Windows Subsystem for Linux, suitable for lightweight use (Windows 10/11)
Installation Steps Overview (using VirtualBox + Ubuntu as an example):
- Download VirtualBox: https://www.virtualbox.org/
- Download the Ubuntu ISO image: https://ubuntu.com/download/desktop
- Create a new virtual machine in VirtualBox, allocate at least 2GB RAM and 20GB disk
- Mount the ISO image and start the installation
- Follow the wizard to set up username, password, timezone, etc.
💡 Tip: 💡 WSL2 quick setup: Run
wsl --install -d Ubuntuin PowerShell for a one-click installation.
2.2 SSH Remote Connection
In practice, Linux servers usually don't have a graphical interface, so you need to connect remotely via SSH (Secure Shell).
Connecting from Windows:
- Windows 10/11 comes with a built-in SSH client, use it directly in CMD/PowerShell
- Or use tools like PuTTY, MobaXterm, Termius, etc.
Basic Connection Commands:
# Basic SSH connection
ssh username@192.168.1.100
# Specify port (default is 22)
ssh -p 2222 username@192.168.1.100
# Use key-based login (more secure)
ssh -i ~/.ssh/id_rsa username@192.168.1.100The authenticity of host '192.168.1.100 (192.168.1.100)' can't be established.
ED25519 key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.1.100' (ED25519) to the list of known hosts.
username@192.168.1.100's password:
Welcome to Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-91-generic x86_64)
Last login: Sat Jun 20 10:30:45 2026 from 192.168.1.50
username@server:~$Generating an SSH Key Pair:
ssh-keygen -t ed25519 -C "your_email@example.com"Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/user/.ssh/id_ed25519):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/user/.ssh/id_ed25519
Your public key has been saved in /home/user/.ssh/id_ed25519.pub
The key fingerprint is:
SHA256:AbCdEfGhIjKlMnOpQrStUvWxYz1234567890abcde your_email@example.comCopying the Public Key to the Server:
ssh-copy-id username@192.168.1.1002.3 Terminal Basics
The Terminal is your window for communicating with Linux. After opening a terminal, you'll see a Prompt:
username@hostname:~$This prompt contains the following information:
- username: the currently logged-in user
- @hostname: the hostname
- ~: the current directory (~ represents the home directory)
- $: regular user prompt (# indicates the root user)
⚠️ Note: ⚠️ Important: Linux commands are case-sensitive!
Fileandfileare completely different things.
Five Ways to Get Help:
# Method 1: man pages (most detailed)
man ls
# Method 2: --help flag (quick reference)
ls --help
# Method 3: info docs (GNU style)
info ls
# Method 4: whatis one-line description
whatis ls
# Method 5: apropos search for related commands
apropos "list directory"$ whatis ls
ls (1) - list directory contents
$ apropos "list directory"
dir (1) - list directory contents
ls (1) - list directory contents
vdir (1) - list directory contents