You must master these basic Linux commands
You must master these basic Linux commands
- Why Enterprise RAID Rebuilding Succeeds Where Consumer Arrays Fail?
- Linus Torvalds Rejects MMC Subsystem Updates for Linux 7.0: “Complete Garbage”
- The Man Who Maintained Sudo for 30 Years Now Struggles to Fund the Work That Powers Millions of Servers
- How Close Are Quantum Computers to Breaking RSA-2048?
- Why Windows 10 Users Are Flocking to Zorin OS 18 Instead of Linux Mint?
- How to Prevent Ransomware Infection Risks?
- What is the best alternative to Microsoft Office?
You must master these basic Linux commands
People often ask whether they need to learn Linux systematically? The answer is no, you just need to master some basic commands.
For specific operations, it is completely OK to face search engines/chatGPT when you encounter them.

Many beginners in fields like deep learning, machine learning, data analysis, mostly operating in Python environments, start their learning journey on Windows. Tools like Anaconda make environment management easy in this context.
However, for deeper immersion in these fields, interacting with the Linux operating system becomes inevitable. People often ask if it’s necessary to learn the entire system. The answer is no. Just grasp some basic commands. Specific operations can always be tackled using search engines or chatbots when encountered.
While not a requirement to know everything, mastering the following high-frequency basic operations is essential. Let’s take a look.
Navigation Commands Firstly, understanding navigation commands, likely the most frequently used:
cd: Enter a directoryls: List all content in the current directory; use-loption for a detailed display, including permissions, ownership, and timestampspwd: Display the current directory’s pathmkdir: Create a new directory; for instance, to create a folder named ‘build’ in the current directory, usemkdir build
File Management Commands Next are file management commands, enabling you to create, delete, and manage files and directories:
touch: Create a new file; for example, to create a new file named ‘new_file.txt’, usetouch new_file.txtrm: Delete a file; for instance, to delete the file ‘old_file.txt’, userm old_file.txt; to delete an entire folder,rm -r build/(please, no accidental deletions)cp: Copy files from one location to another; for example, to copy the ‘file.txt’ from the current directory to the ‘Desktop’ directory, usecp file.txt ~/Desktopmv: Move files from one location to another or change file names; for instance, to move ‘file.txt’ from the current directory to the ‘Desktop’ directory, usemv file.txt ~/Desktopfind: Locate a file; for instance, to find a file named ‘file.txt’ within ‘/home’, usefind /home -name "file.txt"
Text Processing Commands Then come text processing commands for handling text files:
cat: Display the contents of a text file; for example, to display the contents of ‘file.txt’, usecat file.txtgrep: Search within a file; for instance, to search for the word ‘hello’ in ‘file.txt’, usegrep "hello" file.txtsort: Sort the contents of a file; for instance, to sort the content of ‘file.txt’ alphabetically, usesort file.txtwc: Calculate the number of lines, words, and characters in a file; for example, to count the number of lines in ‘file.txt’, usewc -l file.txt
System Information Commands Mastering system information commands helps in obtaining system details and monitoring performance:
uname: Display information about the operating system; for example, to display the name and version of the operating system, useuname -atop: Display information about running processes and their usage of system resources in real-time; for monitoring CPU and memory usage when a program runs,htopis commonly useddf: Display information about available disk space on the system; for instance, to show disk space usage for all mounted file systems, usedf -hfree: Display information about available memory on the system; for example, to show the system’s memory usage, usefree -m
Package Management Commands When frequently configuring environments following READMEs on GitHub, this set of commands becomes essential:
apt-get update: Update the software package index on the system, downloading the latest information about available packages and their dependencies from the internetapt-get install: Install a software package; for example, to install the ‘nano’ text editor, useapt-get install nanoapt-get remove: Delete a software package; to remove the ‘nano’ text editor, useapt-get remove nanoapt-get upgrade: Upgrade all installed software packages on the system to their latest versions
Network Management Commands For configuring network interfaces on the system and testing connections with remote hosts:
ifconfig: Configure network interfaces, providing detailed information about IP addresses, network masks, and other network configurationsping: Test the connection with a remote host by sending requests and measuring the time required for a response
Process Management Commands Commands for viewing and managing running processes on the system:
ps: Display information about running processes, offering details like process IDs, command names, and other process-specific detailskill: Terminate a running process by sending a signal to stop it
These commands represent only the most basic usage but cover the majority of use cases.