MODULE 3.1
VPS: the same, on a server
Connect to an Ubuntu VPS with your key, navigate with the same commands, and bring your GitHub project there.
What it is
Choose a provider and the Ubuntu operating system. During setup, it asks for an SSH key: paste the line this command displays. Make a note of the IP the provider gives you.
Why learn it
With your key registered, you can connect without a password, and no one without your private key can get in.
Key concepts
VPS: a rented Linux computer that runs 24 hours a day. Ubuntu: the most widely used Linux version on servers. IP: the server's numeric address. type: displays the contents of a file in cmd.
What it is
Replace VPS-IP with the number from your provider. The first time, it asks whether you trust the server: answer yes. To disconnect, type exit.
Why learn it
It's the same window as always, but connected to another machine. Everything you type now happens on the VPS.
Key concepts
ssh: opens a secure connection to another computer. root: the Linux administrator. ~: the user's home folder on the VPS. exit: closes the connection and returns to Windows.
What it is
On the VPS: dir becomes ls, cls becomes clear, type becomes cat, %USERPROFILE% becomes ~, and the slash is / instead of \. cd, cd .., and mkdir are the same. There's no File Explorer: ls does that job.
Why learn it
That's why the course starts on Windows: anyone who understands folders there can navigate the VPS in minutes.
Key concepts
ls: lists the folder. pwd: shows where you are. mkdir -p: creates the folder and doesn't complain if it already exists. Linux is case-sensitive: Projects and projects are different folders.
What it is
apt installs Git on Ubuntu. git clone copies the entire repository, including its history, into the current folder.
Why learn it
GitHub is the bridge: the same project lives on Windows and the VPS, and the versions move from one to the other.
Key concepts
apt: the Ubuntu installer (similar to winget). git clone: downloads a repository for the first time. && : runs the second command only if the first one succeeds.
What it is
The Linux installation command is the one in the official documentation. The first time you use it, the agent shows an address: open it in your computer's browser and sign in with your subscription.
Why learn it
With the agent on the VPS, work can continue on the server even when your computer is turned off.
Key concepts
install.sh: the installer for Linux and Mac. | bash: gives the downloaded installer to the terminal to run. Login without a screen: the agent shows a link and a code so you can authorize it from another device.
What it is
Changed something on Windows and pushed it? On the VPS, git pull brings in the change. To return to Windows, use exit.
Why learn it
That's the routine between the two machines: push on one side, pull on the other, always through GitHub.
Key concepts
git pull: brings in the latest versions from GitHub. exit: closes the SSH connection. To reconnect: ssh root@VPS-IP and cd ~/projects/my-site.