
Linux Team's Must-Have: The Complete Guide for Beginners and Pros
Linux is one of the most popular operating systems in the world, especially among developers and system administrators. Basic Linux commands allow you to manage files, processes, system settings, and perform many other tasks. In this article, we will review the most important commands, their syntax, and practical applications. Commands for managing files and folders are some of the most frequently used in Linux. They allow creating, deleting, copying, moving, and viewing contents. The The The Creates a new directory. For example, Deletes files or directories. For example, Copies files or directories. For example, Moves or renames files and folders. For example, To quickly view file contents, use the commands: Displays the content of a file on the screen. For example, Allows viewing the file page by page and searching within the file. Useful for large files. Displays the first lines of a file. You can specify the number of lines with the Displays the last lines of a file. Similarly, you can specify the number of lines, for example, Managing running processes includes viewing, stopping, and starting new tasks. Displays a list of current processes. For example, An interactive tool for monitoring processes in real time. Shows CPU usage, memory, and other parameters. Sends a signal to a process to terminate it. For example, Allows terminating processes by name. For example, Commands Changes permissions. For example, Changes the owner of a file or folder. For example, Changes the group of a file. For example, Managing software is done through package managers. Different commands are used depending on the distribution. Installing a package: Updating the package list: Upgrading the system: Installing a package: Updating the system: Commands for compression and decompression of files: Create an archive: Extract an archive: Create an archive: Extract an archive: Commands for diagnosing network issues and configuration: Checks the availability of a host on the network. For example, Displays network interface configuration. In newer systems, it is recommended to use Displays active connections and ports. In newer systems, it is replaced by Securely connects to a remote server: Linux commands provide a powerful toolkit for system management, task automation, and file handling. Mastering basic commands significantly increases work efficiency and helps better understand internal OS processes. Regular practice and exploring additional command features will make you a more confident Linux user.
Overview of Basic Linux Commands
Working with Files and Directories
ls
ls
command displays a list of files and folders in the current directory. You can use various options, for example, -l
for detailed information about files, or -a
to show hidden files.
pwd
pwd
command outputs the current working directory, i.e., the path to the folder you are currently in.
cd
cd
command is used to change the current directory. For example, cd /home/user/Documents
will take you to the Documents folder.
mkdir
mkdir my_folder
will create a folder named my_folder.
rm
rm file.txt
will delete the file. To delete a folder with its contents, use rm -r folder_name
.
cp
cp file.txt /home/user/backup/
will copy the file to another folder.
mv
mv old_name.txt new_name.txt
will rename the file.
Viewing File Contents
cat
cat file.txt
.
less
head
-n
option, for example, head -n 20 file.txt
.
tail
tail -n 20 file.txt
.
Process Management
ps
ps aux
shows all running processes.
top
kill
kill -9 PID
forcibly terminates the process with the specified PID.
pkill
pkill firefox
will terminate all Firefox processes.
Managing Access Rights
chmod
, chown
, and chgrp
are used to manage access to files and folders.
chmod
chmod 755 script.sh
sets execute and read permissions for the owner, and read-only for others.
chown
chown user:user file.txt
.
chgrp
chgrp staff file.txt
.
Package Management
For Debian/Ubuntu-based systems:
apt-get
sudo apt-get install package_name
sudo apt-get update
sudo apt-get upgrade
For Red Hat/CentOS-based systems:
yum
sudo yum install package_name
sudo yum update
Working with Archives and Archivers
tar
tar -cvf archive.tar folder/
tar -xvf archive.tar
zip
zip archive.zip file1 file2
unzip
unzip archive.zip
Network Operations
ping
ping google.com
.
ifconfig
ip addr
.
netstat
ss
.
ssh
ssh user@host
.
Conclusion
Published:
Views: 27