You just got your first VPS, logged in over SSH, and now you are staring at a blank terminal. Everything you need to do on this machine starts with a command. This is not a full Linux textbook. It is the practical set of commands that covers 90% of day-to-day VPS work, explained with real examples.
Connecting to your server
Before anything else, you need to get in. Open a terminal on your local machine and connect with SSH:
ssh root@your-server-ip
If you use a key file instead of a password:
ssh -i ~/.ssh/mykey root@your-server-ip
Once you see the command prompt, you are on your server. Everything you type now runs there, not on your own machine.
Navigation and file management
Moving around and working with files is the foundation of everything else.
pwdprints your current directory. If you are lost, start here.ls -lalists all files in the current directory, including hidden ones, with permissions and sizes.cd /var/wwwchanges directory. Usecd ..to go up one level.mkdir myprojectcreates a new directory.cp file.txt backup.txtcopies a file. Add-rfor directories.mv old.txt new.txtmoves or renames a file.rm file.txtdeletes a file.rm -rf directory/deletes a directory and everything in it. Be careful: there is no recycle bin.
Reading and editing files
You will read configuration files constantly. These commands help:
cat config.ymlprints the entire file to the screen.less config.ymlopens the file in a scrollable viewer. Pressqto quit.head -n 20 logfile.logshows the first 20 lines.tail -n 50 logfile.logshows the last 50 lines. Add-fto follow the file in real time, which is perfect for watching logs.nano config.ymlopens a simple text editor in the terminal. Edit, then press Ctrl+O to save and Ctrl+X to exit.
Package management (Debian/Ubuntu)
Most VPS providers ship Debian or Ubuntu. Installing and updating software uses apt:
apt updaterefreshes the package list. Always run this first.apt upgradeinstalls available updates for all packages.apt install nginxinstalls a package (nginx in this example).apt remove nginxremoves it.
On CentOS or AlmaLinux, replace apt with dnf.
Managing services
Services like web servers, databases and game servers are controlled with systemctl:
systemctl start nginxstarts the service.systemctl stop nginxstops it.systemctl restart nginxrestarts it (useful after config changes).systemctl status nginxshows whether it is running and any recent log lines.systemctl enable nginxmakes it start automatically on boot.
Monitoring your server
Knowing what your server is doing right now saves debugging time later:
htopshows CPU, RAM and running processes in a live dashboard. Pressqto quit. Install it withapt install htopif it is not already there.df -hshows disk space usage per partition. Watch for a root partition above 90%.free -hshows total, used and available memory.uptimeshows how long the server has been running and the load average.
Networking
Checking connectivity and open ports:
ping google.comtests whether the server can reach the internet.curl -I https://example.comchecks HTTP response headers from a URL.ss -tlnplists all listening TCP ports and which process owns each one.ufw allow 80opens port 80 in the firewall.ufw statuslists current rules.
Permissions and ownership
Files on Linux have an owner and permission flags. When something does not work, permissions are often the reason:
chown -R www-data:www-data /var/www/sitesets the owner of a directory and everything inside it.chmod 755 script.shmakes a script executable.chmod 600 secrets.envrestricts a file so only the owner can read it.
A HostValues VPS gives you full root access on a KVM machine with these tools ready out of the box. Pick your OS, log in and start building.
Do I need to know Linux to use a VPS?
You need the basics covered in this guide, yes. A VPS gives you an empty machine and expects you to manage it. If you prefer a managed experience where software is pre-installed, a game panel or managed hosting is a better fit. But learning these commands is not hard, and the control you gain is worth the initial effort.
What is the difference between apt and dnf?
apt is the package manager for Debian-based systems (Debian, Ubuntu). dnf is for Red Hat-based systems (CentOS, AlmaLinux, Fedora). They do the same thing with slightly different syntax. Most VPS guides assume Ubuntu, so apt is what you will see most often.
How do I keep my VPS secure?
Start with three steps: disable root password login and use SSH keys instead, enable a firewall (ufw) and only open ports you need, and run apt update && apt upgrade regularly to patch known vulnerabilities. These three steps block the vast majority of automated attacks.