DEV Community

Cover image for 🐧 Linux Command Cheat Sheet: Essential Commands with Examples

🐧 Linux Command Cheat Sheet: Essential Commands with Examples

Eshan Roy (eshanized) on December 01, 2024

Linux is a powerful operating system, and its command line is the key to unlocking its full potential. Here's your Linux command cheat sheet with e...
Collapse
 
xinitd profile image
Shakhzhakhan Maxudbek • Edited

Good job! Here my suggestions:

Changing directory ownership recursively:

chown -R user:group /path/to/directory
Enter fullscreen mode Exit fullscreen mode

Adding executable flag to file:

chmod +x /path/to/script.sh
Enter fullscreen mode Exit fullscreen mode
Collapse
 
eshanized profile image
Eshan Roy (eshanized)

I have added your writing also. Checkout! Thanks for contributing! Do follow my project on GitHub: github.com/Snigdha-OS

Collapse
 
schelp profile image
Schelp

Nice work, dude!
Maybe, you can add some like:

  • ls
ls -ltrha (to bring the lastest files/dirs that had modifications.
Enter fullscreen mode Exit fullscreen mode
  • cd "", to enter in directories with that had an space into their names, like:
cd "/home/schelp/my files"
ls -ltrha "/home/schelp/my files"
Enter fullscreen mode Exit fullscreen mode
  • df -h (known a little bit more of the filesystem used, maybe its a good idea)
df -Th
Enter fullscreen mode Exit fullscreen mode

One of the shortcuts that I like is:

# to clear the terminal screen
crtl + l
Enter fullscreen mode Exit fullscreen mode
Collapse
 
eshanized profile image
Eshan Roy (eshanized)

Sure bro! I will modify this❤️

Collapse
 
lotfijb profile image
Lotfi Jebali

Thanks for sharing

Collapse
 
eshanized profile image
Eshan Roy (eshanized)

Thanks for appreciating ! Do follow my project on GitHub: github.com/Snigdha-OS ❤️

Collapse
 
fazly_fathhy profile image
Fazly Fathhy

what is the difference between chmod +x /path/to/script.sh and chmod u+x /path/to/script.sh ?

Collapse
 
eshanized profile image
Eshan Roy (eshanized)

chmod +x /path/to/script.sh is used when you want to make the script executable for all users e.g groups and it is equivalent to a+x -a stands for all. on the other side u+x is used when you want to give permission for owner only. in details you can say like chmod +x = rwxr-xr-x and chmod u+x = rwxr--r--. Thank You for the question.

Collapse
 
kiran_baliga profile image
Kiran Baliga

Nice post!

Collapse
 
eshanized profile image
Eshan Roy (eshanized)

Thanks for appreciating ! Do follow my project on GitHub: github.com/Snigdha-OS

Collapse
 
eshanized profile image
Eshan Roy (eshanized)

@schelp I have added your writing also. Checkout! Thanks for contributing! Do follow my project on GitHub: github.com/Snigdha-OS

Collapse
 
abhijeet_waghmare_59c8649 profile image
Abhijeet Waghmare

Nice

Collapse
 
eshanized profile image
Eshan Roy (eshanized)

Thanks for appreciating ! Do follow my project on GitHub: github.com/Snigdha-OS