Server Setup
- How do I set up a Linux server for the first time?
Install a Linux distribution, update packages, create a non-root user with sudo, configure SSH key authentication, set up a firewall, and disable password logins. - How do I create a new user on a Linux server?
Use sudo adduser username (Debian/Ubuntu) or sudo useradd -m username (RHEL-based), then set a password with sudo passwd username and add sudo privileges if needed. - What is SSH and how does it work?
SSH (Secure Shell) is a protocol for encrypted remote login and command execution. It uses public-key cryptography to authenticate the server and optionally the client. - How do I configure a firewall on Linux?
Use UFW on Debian/Ubuntu or firewalld on RHEL-based systems. Allow SSH first, then enable the firewall and open only the ports you need. - How do I keep a Linux server updated?
Use your distribution's package manager to apply updates regularly, and enable automatic security updates where possible. For Debian/Ubuntu use apt; for RHEL/CentOS/Rocky use dnf or yum. - What is the best way to secure a new Linux server?
There is no single best way, but a strong baseline includes: update the system, create a non-root user with sudo, disable password SSH logins, set up a firewall, and enable automatic security updates.