Essential Linux Commands for Server Maintenance at Home

📆 · ⏳ 2 min read · ·

Introduction

Linux is a powerful operating system that offers a wide range of tools and utilities for system administrators. Whether you’re managing a server at work or at home, it’s important to have a good understanding of the most commonly used commands.

In this blog, we’ll be exploring some of the essential Linux commands that are useful for maintaining a server at home.

đź’ˇ

Pro Tip!

I won’t be able to list down all the available options for each command in this article, but don’t worry, if you want to explore all the options for each of these commands then use the man <command_name> and you will find all the necessary information there.

Handling Files

  • ls - List the contents of a directory.

    Usage: ls [options] [file]

  • cp - Copy files and directories

    Usage: cp [options] source_file destination_file

  • mv - Move or rename files and directories

    Usage: mv [options] source_file destination_file

  • rm - Remove files and directories

    Usage: rm [options] file

  • mkdir - Create a new directory

    Usage: mkdir [options] directory_name

  • rmdir - Remove an empty directory

    Usage: rmdir [options] directory_name

Networking

  • ping - Check network connectivity to a host

    Usage: ping [options] hostname

  • traceroute - Display the route taken to reach a network host

    Usage: traceroute [options] hostname

  • netstat - Show network connections, routing tables, and interface statistics

    Usage: netstat [options]

  • ifconfig - Configure network interfaces

    Usage: ifconfig [options] interface_name

System Information

  • ps - Display information about active processes

    Usage: ps [options]

  • top - Display system resource usage and active processes

    Usage: top [options]

  • free - Display memory usage information

    Usage: free [options]

  • df - Show disk space usage information

    Usage: df [options]

  • uptime - Display system uptime

    Usage: uptime [options]

System Maintenance

  • apt-get - Install, upgrade, and remove software packages

    Usage: apt-get [options] package_name

  • systemctl - Control the system’s services and processes

    Usage: systemctl [options] service_name

  • journalctl - View system logs

    Usage: journalctl [options]

  • crontab - Schedule tasks to run at specific times

    Usage: crontab [options]

  • ssh - Securely connect to another server

    Usage: ssh [options] user@host

Conclusion

These are just some of the most commonly used Linux commands that a system administrator may use on a daily basis.

Use Linux man pages to dig deep dive into each of these commands and the options to leverage them effectively in your workflows.

You may also like

  • Mount a drive permanently with fstab in Linux

    Let's see how to mount a drive permanently in Linux using the fstab file which will mount the drive automatically on boot.

  • Setup Jellyfin with Hardware Acceleration on Orange Pi 5 (Rockchip RK3558)

    Recently I moved my Jellyfin to an Orange Pi 5 Plus server. The Orange Pi 5 has a Rockchip RK3558 SoC with integrated ARM Mali-G610. This guide will show you how to set up Jellyfin with hardware acceleration on the Orange Pi 5.

  • HTTPS with self-signed certificates for your Homelab services

    In this article we will deep dive into understanding how we can setup HTTPS with self-signed certificates for our Homelab services.This is often required when you are running your own services and you want to access them over HTTPS.