DEV Community

Cover image for 50 basic Linux commands
Ritik Pal
Ritik Pal

Posted on

50 basic Linux commands

𝐄𝐬𝐬𝐞𝐧𝐭𝐢𝐚𝐥 𝟓𝟎 𝐁𝐚𝐬𝐢𝐜 𝐋𝐢𝐧𝐮𝐱 𝐂𝐨𝐦𝐦𝐚𝐧𝐝𝐬: 𝐌𝐚𝐬𝐭𝐞𝐫 𝐘𝐨𝐮𝐫 𝐂𝐨𝐦𝐦𝐚𝐧𝐝 𝐋𝐢𝐧𝐞 𝐒𝐤𝐢𝐥𝐥𝐬 🐧

𝐩𝐰𝐝 - Print working directory. 📂
𝐥𝐬 - List directory contents. 📋
𝐜𝐝 - Change directory. 📁
𝐭𝐨𝐮𝐜𝐡 - To create a file without any content. 📄
𝐜𝐚𝐭 - Concatenate and display file content. 🐱
𝐜𝐩 - Copy files or directories. 📁📂
𝐦𝐯 - Move or rename files or directories. 🔄
𝐫𝐦 - Remove files or directories. 🗑️
𝐦𝐤𝐝𝐢𝐫 - Create a new directory. 📁
𝐫𝐦𝐝𝐢𝐫 - Remove an empty directory. 📁🗑️
𝐞𝐜𝐡𝐨 - Display a line of text or a variable value. 📢
𝐧𝐚𝐧𝐨 - A simple text editor. ✏️
𝐯𝐢 - A powerful text editor. ✒️
𝐜𝐡𝐦𝐨𝐝 - Change file or directory permissions. 🔐
𝐜𝐡𝐨𝐰𝐧 - Change file or directory owner and group. 👤
𝐟𝐢𝐧𝐝 - Search for files in a directory hierarchy. 🔍
𝐠𝐫𝐞𝐩 - Search text using patterns. 🔎
𝐦𝐚𝐧 - Display the manual for a command. 📖
𝐩𝐬 - Display information about running processes. 🔄
𝐤𝐢𝐥𝐥 - Terminate processes by PID. ⚰️
𝐭𝐨𝐩 - Display and update sorted information about processes. 📊
𝐝𝐟 - Report file system disk space usage. 💾
𝐝𝐮 - Estimate file space usage. 📏
𝐟𝐫𝐞𝐞 - Display memory usage. 🧠
𝐮𝐧𝐚𝐦𝐞 - Print system information. ℹ️
𝐮𝐩𝐭𝐢𝐦𝐞 - Tell how long the system has been running. ⏳
𝐰𝐡𝐨𝐚𝐦𝐢 - Display the current user. 👤
𝐬𝐮𝐝𝐨 - Execute a command as another user, typically the superuser. 🛡️
𝐚𝐩𝐭-𝐠𝐞𝐭 - Package handling utility for Debian-based distributions. 📦
𝐲𝐮𝐦 - Package manager for RPM-based distributions. 🍲
𝐭𝐚𝐫 - Archive files. 🗃️
𝐳𝐢𝐩 - Package and compress (archive) files. 📦
𝐮𝐧𝐳𝐢𝐩 - Extract compressed files. 📂
𝐰𝐠𝐞𝐭 - Retrieve files from the web. 🌐
𝐜𝐮𝐫𝐥 - Transfer data from or to a server. 🔄
𝐬𝐬𝐡 - OpenSSH client (remote login program). 🚪
𝐬𝐜𝐩 - Secure copy (remote file copy program). 🔒
𝐫𝐬𝐲𝐧𝐜 - Remote file and directory synchronization. 🔄
𝐡𝐨𝐬𝐭𝐧𝐚𝐦𝐞 - Show or set the system's host name. 🏠
𝐩𝐢𝐧𝐠 - Send ICMP ECHO_REQUEST to network hosts. 📶
𝐧𝐞𝐭𝐬𝐭𝐚𝐭 - Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. 🌐
𝐢𝐟𝐜𝐨𝐧𝐟𝐢𝐠 - Configure a network interface. 🌐
𝐢𝐩 - Show/manipulate routing, devices, policy routing, and tunnels. 🌐
𝐢𝐩𝐭𝐚𝐛𝐥𝐞𝐬 - Administration tool for IPv4 packet filtering and NAT. 🛡️
𝐬𝐲𝐬𝐭𝐞𝐦𝐜𝐭𝐥 - Control the systemd system and service manager. 🔄
𝐣𝐨𝐮𝐫𝐧𝐚𝐥𝐜𝐭𝐥 - Query and display messages from the journal. 📜
𝐜𝐫𝐨𝐧𝐭𝐚𝐛 - Schedule periodic background jobs. ⏰
𝐬𝐮𝐝𝐨 𝐬𝐮 - Allows us to switch to a different user and execute one or more commands in the shell without logging out from our current session. 🛡️
𝐦𝐨𝐮𝐧𝐭 - Mount a file system. 📂
𝐮𝐦𝐨𝐮𝐧𝐭 - Unmount a file system. 📂

🐧 Use these commands to interact with your Linux system and perform various administrative tasks! 🚀

LinuxCommands #SysAdmin #DeveloperTips #LinuxTips #DevOps #CodingLife #CommandLine #LinuxTutorial #aws #linux #bash #devops

Top comments (14)

Collapse
 
tungbq profile image
Tung Leo • Edited

That's a great summary. Adding htop as it provides us the very nice UI and metrics of our process usage
Image description

Collapse
 
luna_dev profile image
Luna

Some ppl might have to install that first, there is also top which is usually installed by default :)

Collapse
 
oktay454 profile image
Kemal Oktay

A humble suggestion; Instead of "sudo su", "sudo -i" would be more correct.

Collapse
 
just_ritik profile image
Ritik Pal

Thanks for the comments

Collapse
 
coder0p_ profile image
vasu sharma

for detailed process you can use glances also but you have to install first

Collapse
 
just_ritik profile image
Ritik Pal

can you please guide me for that ?

Collapse
 
kushgupta profile image
Kush Gupta • Edited

helpful!! :)

Collapse
 
just_ritik profile image
Ritik Pal

thanks for your comment

Collapse
 
offpepe profile image
Alan Albuquerque Ferreira Lopes • Edited

A little curiosity: the touch command is not primarily intended to create a new file; it is used to change the access and/or modification date and time of an existing file. However, if you use touch on a non-existent file, it will create a new file. To explicitly create a new file, you can use:

>>filename.ext
Enter fullscreen mode Exit fullscreen mode

nice article!

Collapse
 
zabetta profile image
alessandro cerea

very helpful

Collapse
 
yared_wonber_15199bbf1f98 profile image
Yared Wonber

Thanks a lot!!

Collapse
 
shwetha_patil_000e5f58db4 profile image
Shwetha Patil

If there is example for each command it would be even more helpful

Collapse
 
just_ritik profile image
Ritik Pal

will share each & every Example Later Thanks

Collapse
 
basharjehadi profile image
ABUL BASHAR

Nice resource