In this article, we’ll explore the most common Linux commands you can use to perform basic tasks on your Linux system.
Table of Contents
Below, you will find a list of Most Common Linux commands

1. Navigating the File System
One of the fundamental skills in Linux is navigating the file system. Here are some commands that help you move around.
pwd
: Print the current working directory.ls
: List files and directories.cd
: Change the current directory.mkdir
: Create a new directory.
$ pwd
/home/username/documents
$ ls
file1.txt folder1 file2.txt
$ cd /home/username/documents/folder1
$ mkdir new_folder
2. Working with Files and Directories
Linux commands for managing files and directories are essential for effective file manipulation.
cp
: Copy files and directories.mv
: Move files and directories.rm
: Remove files and directories.chmod
: Change file permissions.chown
: Change file ownership.
$ cp file1.txt /home/user/documents/folder1
$ mv file2.txt /home/user/documents/folder1/new_folder
$ rm file1.txt
$ chmod 755 file2.txt
$ chown newowner:newgroup file1.txt
3. User and Permission Management
Understanding user management and permissions is crucial for maintaining a secure system.
useradd
: Create a new user.passwd
: Change user password.sudo
: Execute commands with superuser privileges.chgrp
: Change group ownership.
$ sudo useradd newuser
$ sudo passwd newuser
$ chgrp admin file1.txt
4. Process Management
Monitoring and managing processes is essential for efficient system resource utilization.
ps
: List running processes.top
: Display dynamic information about processes.kill
: Terminate processes.
$ ps aux
$ top
$ kill <process_id>
5. Networking Commands
Networking commands help you manage network settings and connections.
ifconfig
: Configure network interfaces.ping
: Test network connectivity.netstat
: Display network statistics.
$ ifconfig eth0 up
$ ping google.com
$ netstat -tuln
6. Package Management
Managing software packages is a breeze with package management tools.
apt-get
: Package manager for Debian-based systems.yum
: Package manager for Red Hat-based systems.
$ sudo apt-get install package_name
$ sudo yum install package_name
7. System Information
Gathering system information is essential for troubleshooting and monitoring.
uname
: Display system information.df
: Show disk space usage.free
: Display memory usage.
$ uname -a
$ df -h
$ free -h
8. Working with Text Files
Commands for manipulating text files are valuable for data processing and editing.
cat
: Display file contents.grep
: Search for patterns in files.sed
: Stream editor for text manipulation.
$ cat file1.txt
$ grep "keyword" file2.txt
$ sed 's/old_text/new_text/' file3.txt
9. Archiving and Compression
Efficiently manage archives and compressed files with these commands.
tar
: Create and extract tar archives.gzip
: Compress and decompress files.
$ tar -cvf archive.tar file1.txt file2.txt
$ gzip file1.txt
10. Searching for Files
Locate files and directories quickly with these search commands.
find
: Search for files and directories.locate
: Quickly find files in a database.
$ find /home/user -name "*.txt"
$ locate file1.txt
11. Customizing the Shell
Personalize your shell environment to suit your preferences.
alias
: Create custom command aliases.export
: Set environment variables.
$ alias ll="ls -la"
$ export PATH=$PATH:/new_directory
Conclusion
It can take some time to learn Linux, but with a little practice, you’ll become more comfortable navigating and manipulating your system using the command line.
To get more articles on the most common Linux commands, we welcome you to explore our easy2excel.in website.
You can follow the below link for more reference