Debian Setup Guide

Networking and Remote Access

Install SSH Server

Installs OpenSSH server allowing remote connections via SSH protocol.

sudo apt install openssh-server
[shell]

Start SSH Service

Immediately activates the SSH service to accept connections.

sudo systemctl start ssh
[shell]

Enable SSH on Boot

Configures the SSH service to start automatically on system startup.

sudo systemctl enable ssh
[shell]

Check SSH Status

Shows the current status, active/inactive, of the SSH service.

sudo systemctl status ssh
[shell]

Check Network Interfaces

Displays detailed information about all network interfaces and their IP addresses.

ip a
[shell]
User Setup

Create User

Creates a new user account. Replace <username> with desired username and set password when prompted.

sudo adduser <username>
[shell]

Edit Sudoers

Opens the sudoers file to grant sudo privileges. Add '<username> ALL=(ALL:ALL) ALL' and save.

sudo visudo -f /etc/sudoers
[shell]

Check User Sudo

Confirms the sudo permissions assigned to the specified user.

sudo -l -U <username>
[shell]
System Maintenance and Management

Update System

Fetches latest package lists and upgrades existing packages to their latest versions.

sudo apt update && sudo apt upgrade -y
[shell]

Check System Errors

Displays system errors and potential issues from system logs.

sudo journalctl -p err
[shell]

Install Neofetch

Installs Neofetch utility that visually displays system information.

sudo apt install neofetch
[shell]

Run Neofetch

Displays detailed system information visually.

neofetch
[shell]

Check Disk Usage

Displays disk usage statistics for all mounted file systems in human-readable format.

df -h
[shell]

Install rsync

Installs rsync tool used for efficient file backups and synchronization.

sudo apt install rsync
[shell]
Docker and Containers

Install Docker

Installs Docker to manage and deploy containerized applications.

sudo apt install docker.io
[shell]
Development Tools

Install Git

Installs Git, the distributed version control system for tracking code changes.

sudo apt install git
[shell]
Time Synchronization

Install NTP

Installs Network Time Protocol service for system time synchronization.

sudo apt install ntp
[shell]
System Security

Install UFW

Installs Uncomplicated Firewall to easily manage network traffic.

sudo apt install ufw
[shell]

Allow SSH Through Firewall

Permits SSH connections through the firewall.

sudo ufw allow ssh
[shell]

Enable Firewall

Activates UFW firewall protection immediately.

sudo ufw enable
[shell]

Check Firewall Status

Displays detailed firewall rules and status information.

sudo ufw status verbose
[shell]

Install Fail2Ban

Installs Fail2Ban, automatically banning IPs with malicious activities detected in log files.

sudo apt install fail2ban
[shell]
2025