Essential Linux commands after 20 years spent in the terminal

Essential Linux Commands for Administrators and Advanced Users

After two decades of experience using the Linux terminal extensively, certain commands have become essential tools for mastering and optimizing interactions with the system. They cover a variety of areas, including file management, automation, process control, and network navigation. Among these commands, `ssh` stands out as a fundamental pillar. The `ssh` (Secure Shell) command allows you to connect remotely to Linux machines, often indispensable for a system administrator or developer. For example, `ssh user@server_ip` opens a secure remote session. This command is frequently used in the maintenance, deployment, and troubleshooting of remote servers. While graphical interfaces facilitate certain tasks, nothing replaces the flexibility and speed of direct access via `ssh`. Another classic is managing permissions using `chmod`, which remains essential for ensuring the security of files and scripts. Thanks to `chmod u+x script.sh`, it becomes possible to make a script executable, which is the foundation of an efficient shell scripting environment. Beyond this use case, `chmod` allows for fine-grained configuration of read, write, and execute permissions according to the needs of users and groups, which is particularly critical in a multi-user environment.

The `kill` and `killall` commands play a crucial role in managing stubborn processes. They are essential to prevent a malfunctioning application from monopolizing system resources and crashing the computer. For example, using `killall -9 firefox` forces the Firefox browser to close immediately by sending the SIGKILL signal. This allows for a quick return to the machine without having to restart. Alongside these commands, dmesg provides crucial information about startup and kernel messages, useful for detecting hardware or peripheral problems. By combining

sudo dmesg | grep error, you can filter error messages to quickly identify the source of a malfunction. An often underestimated but undeniably useful command is grep . This command is used to search for specific text within one or more files, greatly simplifying the task of analyzing logs or large configuration files. The combined power of

grep with other tools like sed or awk opens the door to complex data processing and advanced automation.

ssh : secure remote connection chmod : fine-grained file permission managementkill / killall

: process control dmesg: system message diagnostics grep : efficient text search Discover the essential Linux commands to master your system and optimize your command-line productivity. Mastering Advanced File Management with find, rsync, and vim File management in Linux is a key area that benefits from powerful commands tailored to the needs of advanced users. Among them, `find` stands out as a master command. It allows you not only to locate files based on multiple criteria—name, size, date, owner—but also to perform automated actions on these files. For example, the following command searches for all .log files modified more than 7 days ago in a directory and deletes those found: `find /var/log -name “*.log” -mtime +7 -exec rm {} ;`

  • This kind of automation is essential for maintaining a clean system without tedious manual intervention.
  • File transfer and synchronization are also a crucial part of daily management.
  • `rsync`
  • This then emerges as the preferred choice. It offers the ability to copy files locally or remotely while minimizing bandwidth consumption thanks to an intelligent algorithm. A common example: `rsync -avz /source/user@server:/destination/` performs a complete synchronization with compression and preservation of attributes.
  • For fast and efficient editing of text files, `vim` remains an essential tool. Powerful and modular, it allows you to manipulate configuration files, scripts, and all types of documents from the command line. Mastering it opens the door to instant modifications, with hundreds of features such as multi-cursor support, advanced search, and plugin integration adapted to modern workflows.
find

: Advanced file search with automated actions

rsync : Robust and efficient synchronization vim

: Ultra-fast text editor in the terminal Combined use to automate maintenance and management of data volumesSupports secure transfers and incremental backups

Discover essential Linux commands to master the terminal, automate your tasks, and optimize your Linux experience. Optimize system monitoring and process management with top and tmux Understanding and managing system behavior in real time is a major asset for the experienced Linux administrator. The top command is one of the most widely used basic tools for an instant overview of resource consumption, whether it be CPU, memory, or the number of active processes.

Top offers a dynamic interface that allows for the rapid identification of resource-intensive applications and abnormal processes. By pressing certain keys, it’s possible to sort by various criteria or directly terminate a problematic process without leaving the interface. For example, during a memory usage spike, Top allows you to isolate the responsible process and manage it immediately. Complementary to Top,

  • tmux
  • is a terminal multiplexing application, essential for long or multitasking sessions. It offers multiple windows, panel separation, and session detachability. An administrator can thus run diagnostics with commands like curl
  • to test HTTP requests in parallel with log viewing, all within a single screen. The combined use of tmux and Top helps to efficiently manage multiple critical tasks without losing context, which is fundamental during complex interventions on production systems.
  • top
: Real-time resource monitoring

tmux

: Advanced terminal session management curl : Network queries and HTTP debugging from the command line

Multiplexing for simultaneous work on multiple tasks

Fine-grained load management and rapid interventions thanks to combined commands Analyze and troubleshoot Linux networks with ping, netstat, and dedicated commands In a network context, a thorough knowledge of Linux commands suited for diagnostics is crucial. ping is often the first step in checking connectivity between two machines. It sends small ICMP requests and measures the response time, thus indicating whether a host is reachable and the quality of the link.

Going beyond ping requires the use of tools like

  • netstat or querying network interfaces using
  • ip addr .
  • netstat This allows you to view current connections, routing tables, and interfaces. These inspections facilitate the detection of open ports and related processes. Combined with network analysis commands, these commands help diagnose and resolve complex configuration problems.
  • Security- and optimization-conscious administrators also use
  • tcpdump

to capture network packets “on the fly,” and

curl to test web servers and REST services. This suite of tools provides the advanced control essential for maintaining a reliable and high-performing Linux network.

ping : test network connectivity netstat : monitor active connections and portstcpdump : capture packets for detailed analysis curl

: evaluate HTTP services View network interfaces with ip addr or ifconfig

  • To learn more about network commands under Linux and their advanced use, it is recommended to consult specialized resources such as this article dedicated to Linux commands for network analysis
  • . Discover essential Linux commands to master your terminal, optimize your tasks, and improve your productivity with simple and effective instructions. Effectively manage packages and users with apt-get, sudo, and group management.
  • Mastering package management remains a fundamental skill for any Linux administrator, especially for distributions based on Debian or Ubuntu. The apt-get command is widely used to install, update, or remove software. It enables quick dependency management, system updates, and precise version control. A typical command to update an entire system in a single line is: `sudo apt-get update && sudo apt-get upgrade -y`. This combination updates package lists and applies all available updates automatically.
  • Regarding privilege management, the sudo
  • and su commands are essential for executing commands with administrative rights without needing to remain logged in as root. This best practice ensures security.

Beyond the simple root user, user and group management is facilitated by specific commands that allow for better organization of resource access. Modifying and viewing groups, and assigning specific rights, are daily tasks for a sysadmin. apt-get: software installation and updates

sudo / su: secure management of elevated privileges

groupadd, usermod: advanced user and group management

Automating updates to prevent security breaches See the tutorials on group management under Linux

and the use of privileges These tools guarantee precise and secure system administration and are essential for any strategy to maintain the operational readiness of Linux machines, particularly within professional infrastructures.