One entry point instead of seven searches: a symptom-cause-command table with links to a full write-up for each problem.

The server stops answering, the site shows a bare error instead of a page, or a command from some tutorial throws back something unreadable - and it's not obvious where to even start. Common Linux server problems tend to be the same handful, over and over, and not because the server is bad: a fresh VPS is a clean system with the bare minimum configured, and the first week with one runs almost everyone through the same few forks in the road. Below is a symptom-likely cause-what to run table covering that whole set, with a link to the full write-up for each.

Takeaways. One entry point instead of seven separate searches. Root login refusing you, or su - asking for a password you don't recognize - covered in the root login article. Forgot a password, or passwd throws an error - the password change article. command not found when trying to run something - the command not found article. Permission denied on files, or a 403 on your site - the file permissions article. Network dropped, or SSH is hit-or-miss - the restart networking article. Site returning 404, 502, 504, or 413 - the nginx errors article. The full table below finds your exact case in under a minute, no need to read everything.

Why these specific problems, and not some other list

These six or seven situations aren't in this list because it needed filling out. They share one cause: each of them sits right on the boundary between "server just got created" and "server is actually set up for the job" - exactly where people trip most. A fresh server has none of the usual packages, no dedicated user account, and no networking tweaked yet, and each of these problems maps to exactly one of those gaps: root access, a password, a missing command, file permissions, a network that stopped answering, or a site that died silently. Working through each one cold takes a while; this page gets you to the right one fast.

Symptom - cause - what to run

Find your case in the left column. Every row links to an article where the command is actually explained - what it does, what you should see, and what to do next.

Symptom

Likely cause

What to run

Full write-up

Root login refuses you: Permission denied (publickey) on ssh root@..., or su - asks for a password you don't recognize

On WeaselCloud, root is already enabled and its password is shown right in the server panel - that's the one to use; on many other providers root really is locked by default, and the path is different

check the password in your panel, then su - or ssh root@your_ip

Root login on Ubuntu

Forgot a password, or need to change your own, another user's, or root's

passwd, sudo passwd, and sudo passwd root are three different scenarios, not one command

passwd / sudo passwd username / sudo passwd root

Changing passwords on Ubuntu

passwd: Authentication token manipulation error while changing a password

Disk is full (often /boot), or the new password failed the strength check three times in a row

df -h

Changing passwords on Ubuntu

bash: command: command not found

The program lives in a separate package that isn't installed yet; the package name doesn't always match the command name

sudo apt update && sudo apt install <package>

Command not found on Ubuntu

apt install returns E: Unable to locate package

The repository list is stale, the package name is mistyped, or the package lives in a repository you haven't added

sudo apt update, apt search <name>

Command not found on Ubuntu

Permission denied reading a file, running ./script.sh, or cd'ing into a directory

A specific rwx bit is missing on that file or directory

ls -l, then chmod / chown

File permissions on Ubuntu

Site returns 403 Forbidden even though permissions on the file itself look correct

One of the parent directories on the path lacks the execute bit (x) needed to pass through it

namei -l /path/to/file

File permissions on Ubuntu

Network on the server is gone: site won't load, apt update hangs, SSH works one minute and not the next

Unclear which renderer is actually managing networking on this box - there are several, and each has its own restart command

grep -R "renderer:" /etc/netplan/, systemctl status systemd-networkd NetworkManager

Restarting networking on Ubuntu and Debian

Site returns 404, 502, 504, or 413 instead of a page

Each code has its own cause - a missing file, a backend that's down, a request that hit a size limit - each covered separately

check the write-up for that specific code

nginx errors: 404, 502, 504, 413

sudo asks for a password on every command in a script or cron job that's supposed to run unattended

Ubuntu's sudo prompts for a password on every new session by default - automation needs that turned off deliberately

sudo visudo -cf /etc/sudoers.d/deploy

Passwordless sudo on Ubuntu

Access and passwords

Half the confusion around a fresh VPS isn't a bug, it's different providers setting up root differently from day one. If ssh root@your_ip or su - doesn't behave the way some other tutorial says it should, that difference is covered in the root login article: what root actually is, how sudo -i differs from sudo su -, and how to enable or lock down root SSH access. If the question isn't who you are but that a password is forgotten or needs changing - yours, another user's, or root's - see the password change article, which also covers account lockouts after failed login attempts and the Authentication token manipulation error.

Commands and packages

A freshly created server ships with the bare minimum installed, not everything you might need, so command not found on a new VPS is normal, not broken. The distinction between command not found (bash, when it can't find an executable) and Unable to locate package (apt, when it doesn't recognize a package name), plus a lookup table for common mismatches like ifconfig/net-tools or pip/python3-pip - all in the command not found article.

File permissions

The same Permission denied error means three different things in Linux depending on what you were doing - reading a file, trying to run it, or walking into a directory. How to read ls -l output, what numbers like 644 and 755 in chmod actually mean, how chown differs from chmod, and why a site can return 403 Forbidden even with correct permissions on the file itself (almost always one of the parent directories) - covered in the file permissions article.

Site won't load: nginx errors

If access to the server itself is fine and the site still isn't responding, the problem has moved from the server to the web server. 404, 502, 504, and 413 are four different codes with four different causes, from a missing file to a backend that didn't respond in time. Each code gets its own breakdown in the nginx errors article.

Network stopped working

Restarting networking depends less on whether you're on Ubuntu or Debian and more on which mechanism is actually managing it - netplan with systemd-networkd, NetworkManager, or ifupdown, each with its own restart command. How to figure out which one you've got, how to restart it without dropping the SSH session you're currently using, and what to do if access is gone after a restart anyway - covered in the restart networking article.

Automation without a password prompt

A separate, common case: sudo isn't being run by you but by a script, a cron job, or CI, where there's nobody around to type a password. Ubuntu's sudo prompts for a password on every new session by default, and turning that off for automation is a deliberate, separate setup - covered in passwordless sudo on Ubuntu.

Frequently asked questions

What do I do if a Linux server stops responding entirely?

Go by the symptom rather than guessing the cause upfront. Can't SSH in as the user you need - that's root or password territory, covered above. Site's down but the server answers SSH - the problem is most likely networking or the web server. The symptom-cause-command table at the top of this page covers every case in one place, so start there.

Why does nginx return 502 Bad Gateway?

502 means nginx couldn't get a response from the backend - PHP-FPM, your app on a port or socket - because it isn't running, crashed, or is listening somewhere other than what the config points to. Full breakdown with diagnostic commands in the nginx errors article.

How do I log in as root on Ubuntu if I don't know the password?

Depends on the provider: some give you root with a password shown in the panel from day one, others lock it by default and route you through a regular user with sudo. If you have sudo access but don't know root's password, use sudo -i, not su -: the first asks for your own password, the second asks specifically for root's. Details in the root login article.

What does command not found mean on Ubuntu?

It's bash telling you it searched the directories in $PATH for an executable with that name and didn't find one. Almost always means the program just isn't installed yet, not that the server is broken. The package name to install doesn't always match the command name - the lookup table and the Unable to locate package breakdown are in the command not found article.

How do I change a password on Ubuntu?

Your own, with passwd - it asks for your current password first. Someone else's, or root's, if you have sudo - sudo passwd username or sudo passwd root, neither asks for the current password. All three scenarios, plus what to do if no password works at all, are covered in the password change article.

Why does Permission denied show up when working with files?

Because your user is missing a specific permission bit - read, write, or execute - for that specific file or directory. How to diagnose it with ls -l, fix it with chmod or chown, and why the same root cause often shows up as a site's 403 Forbidden - covered in the file permissions article.

How do I restart networking on a server without losing SSH access?

First figure out which renderer is managing networking - that determines the restart command, and a full networking service restart drops the current SSH session on some stacks. There are targeted, safer options for each stack, plus a trick for running the restart command on a delay through systemd-run, covered in the restart networking article.

Takeaways

  • These problems repeat for a reason: each one sits on the boundary between "server just got created" and "server is actually set up for the job."
  • Root login refusing you, or su - asking for an unfamiliar password - covered in the root login article.
  • Forgot a password, or passwd throws an error - covered in the password change article.
  • command not found on a new VPS is normal - the program just isn't installed yet, covered in the command not found article.
  • Permission denied on files and a site's 403 Forbidden usually trace back to the same thing, a specific missing permission bit - covered in the file permissions article.
  • Network dropped, or SSH is hit-or-miss - figure out which renderer manages networking first, covered in the restart networking article.
  • Site returning 404, 502, 504, or 413 - each code has its own cause, covered in the nginx errors article.
  • Need passwordless sudo for a script or cron job - covered in the passwordless sudo on Ubuntu article.

🎁 40% off the first month of a new VPS. Promo code GUIDE40
No server of your own yet? Time to get one: the first month at a discount.
Enter GUIDE40 at checkout. One use per customer.
Pick a VPS and claim the discount →