Keeping your server up to date is essential for security. Ubuntu's unattended-upgrades package handles this automatically.Install unattended-upgradessudo apt install unattended-upgradesEnable Automatic Updatessudo dpkg-reconfigure --priority=low unattended-upgradesConfigure Update BehaviorEdit /etc/apt/apt.conf.d/50unattended-upgrades to control which packages are updated and whether the server…
Master your systems with precision and ease.
Comprehensive guides for Windows, Linux, macOS, and beyond. Step-by-step instructions designed for modern developers and system administrators.
A default SSH configuration is a common attack target. These steps reduce your attack surface significantly by changing defaults and restricting access.Change the Default PortEdit /etc/ssh/sshd_config and change:Port 2222Disable Root LoginPermitRootLogin noLimit Login AttemptsMaxAuthTries 3Restrict to Specific UsersAllowUsers alice bobUse Fail2Ban to Block Brute Forcesudo apt install…
The tar command creates and extracts archive files on Linux and macOS. Combined with gzip or bzip2, it produces compressed archives widely used for backups and distribution.Create a Compressed Archivetar -czvf archive.tar.gz /path/to/folderExtract an Archivetar -xzvf archive.tar.gzExtract to a Specific Directorytar -xzvf archive.tar.gz -C /destination/List Archive Contentstar -tzvf archive.tar.gzCreate a bzip2…
Monitoring log files in real time is a critical skill for system administrators. The tail and grep commands are your primary tools for this task.Follow a Log File in Real Timetail -f /var/log/syslogShow Last N Linestail -n 100 /var/log/nginx/error.logFilter Logs with greptail -f /var/log/nginx/access.log | grep "404"Search Across Multiple Log Filesgrep -r "ERROR" /var/log/Case-Insensitive…
curl is a command-line tool for making HTTP requests. It is indispensable for testing REST APIs, downloading files, and debugging web services.Basic GET Requestcurl https://api.example.com/usersPOST Request with JSON Bodycurl -X POST https://api.example.com/users -H "Content-Type: application/json" -d '{"name": "John", "email": "[email protected]"}'Set Authorization Headercurl -H "Authorization: Bearer YOUR_TOKEN"…
Git is the most widely used version control system. This guide walks through installing Git, configuring your identity, and creating your first repository.Install Gitsudo apt install git # Debian/Ubuntu brew install git # macOSConfigure Identitygit config --global user.name "Your Name" git config --global user.email "[email protected]"Initialize a Repositorymkdir myproject && cd myproject git init git add . git commit -m "Initial…
Rsync is the standard tool for fast, incremental file transfer and synchronization on Linux and macOS. It copies only what has changed, making it very efficient for backups.Basic Syntaxrsync -avz source/ destination/Sync to a Remote Serverrsync -avz -e ssh /local/path/ user@server:/remote/path/Dry Run (Preview Changes)rsync -avzn source/ destination/Exclude Filesrsync -avz --exclude="*.log" --exclude="node_modules/" source/…
GPIO (General Purpose Input/Output) pins allow the Raspberry Pi to interact with hardware — LEDs, sensors, relays, and more. This guide introduces GPIO control using Python.Install RPi.GPIO Librarysudo apt install python3-rpi.gpioBlink an LEDimport RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setup(18, GPIO.OUT) for _ in range(10): GPIO.output(18, GPIO.HIGH) time.sleep(0.5) GPIO.output(18, GPIO.LOW)…
A Raspberry Pi makes an excellent low-power home server for file sharing, media streaming, or self-hosted services. This guide sets up the basics.Install Raspberry Pi OS LiteUse the headless (Lite) version for a server — no desktop environment needed, saving RAM and CPU.Assign a Static IPEdit /etc/dhcpcd.conf:interface eth0 static ip_address=192.168.1.50/24 static routers=192.168.1.1 static domain_name_servers=1.1.1.1Install Common Server…
Raspberry Pi OS (formerly Raspbian) is the official operating system for Raspberry Pi boards. This guide walks through the complete installation process using Raspberry Pi Imager.Download Raspberry Pi ImagerDownload it from raspberrypi.com/software and install it on your computer.Flash the SD CardOpen the Imager, choose your device (Raspberry Pi 4), select the OS, and click Write.First BootInsert the SD card, connect keyboard, mouse, and display,…