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 (13)

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
 
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
 
yared_wonber_15199bbf1f98 profile image
Yared Wonber

Thanks a lot!!

Collapse
 
basharjehadi profile image
ABUL BASHAR

Nice resource