Which Linux file and directory commands do VPS administrators use daily?
Daily file work is knowing the directory, listing it, and copying or deleting only a path you have read back. pwd, ls and cd cover place and movement. cp and mkdir copy and create. rm deletes, so type the path before you confirm it. A transfer from your laptop uses the scp command to transfer files.
pwd
ls -lah
history
cd /var/www
mkdir -p ~/backups
cp index.html ~/backups/index.html
rm ~/backups/old.txt
Linux rm does not use a recycle bin. Read the path aloud before you run it. history shows what this shell already typed. It does not undo a delete.
How do you manage Linux users, sudo privileges, and chmod/chown permissions safely?
Create a named account for each person, and grant sudo only to people who must administer the box. Do not share the root password. chmod sets read, write and execute rights. chown sets the owner and the group. Follow add a sudo user in Ubuntu rather than improvising the group edit on a live server.
sudo adduser deploy
sudo usermod -aG sudo deploy
id deploy
chmod 640 .env
sudo chown deploy:www-data /var/www/html
Do not put 777 on a site file. That mode lets every account on the server write it. 640 lets the owner read and write, the group read, and everyone else nothing. Confirm the sudo group with id before you close the root session.
How do you inspect running processes, systemd services, and open ports?
When a site is slow, see what is running before you reboot the server. ps lists processes, systemctl shows whether a service is active, and ss shows which ports are listening. The fuller view of CPU and memory is the htop command. Work that must run on a clock belongs in crontab examples for Linux.
ps aux --sort=-%mem | head
systemctl status nginx --no-pager
ss -tulpn
These three are read-only. status tells you whether nginx is active. ss lists listening ports. Use the htop guide when you need an interactive view, and the crontab guide when the work must run after you log out.
How do you check disk space, RAM usage, and server logs when a site slows down?
A slow site is often a full disk, spent memory, or a line in a log. df -h shows free space on each filesystem. free -h shows RAM and swap. journalctl and the files in /var/log show what a service last wrote. Cleaning a full disk without deleting the site is free disk space on a Linux server.
df -h
free -h
journalctl -u nginx -n 50 --no-pager
df -h is disk space by filesystem. free -h is memory and swap. The journal lines are the recent record for that service. A full disk is a storage problem. Do not delete the live site to make the number drop. Follow the linked cleanup order.
How do you update packages with apt or dnf without breaking a live production VPS?
On Debian and Ubuntu, apt update refreshes the index and apt upgrade applies the packages it lists. On AlmaLinux, Rocky Linux and RHEL, dnf check-update then dnf upgrade does the same job. Read the list before you accept it. Run this on a Linux VPS you are allowed to administer, not during the busiest hour.
# Debian or Ubuntu. Read the list. Do not add -y on a live site.
sudo apt update
sudo apt upgrade
# AlmaLinux, Rocky Linux or RHEL. Do not run this and apt on the same server.
sudo dnf check-update
sudo dnf upgrade
An upgrade can restart PHP or the web server. Do it when a short interruption is acceptable, and only on a server you are allowed to administer. Shared hosting does not give you this shell.

