Linux Basics - the Secrets of chmod
Chmod - short for CHange MODe has been around just about as long as Unix based operating systems have.
This is the command line tool used to modify the permissions of some file, set of files or directories.
It can look pretty complicated on the face of things but once you get used to using it, it’s a breeze. Not to mention that the modern chmod program doesn’t require you to use pesky octals anymore if you so choose.
In this tutorial we’ll go over chmod. The one important thing to remember is that in *nix land, everything and anything on your computer is consider a file by the OS. Keep that in mind and it will help you wrap your brain around chmod.
So how do you use it?
- Login or register to post comments
- Printer-friendly version
- 4531 reads
- PDF version
More in Tux Machines
- Highlights
- Front Page
- Latest Headlines
- Archive
- Recent comments
- All-Time Popular Stories
- Hot Topics
- New Members
digiKam 7.7.0 is releasedAfter three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release. |
Dilution and Misuse of the "Linux" Brand
|
Samsung, Red Hat to Work on Linux Drivers for Future TechThe metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world. Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility. |
today's howtos
|
re: chmod
Do people actually use the letter code (chmod -R u+rwx,g=w,o=r foobar)?
I've always used only the number code (chmod -R 724 foobar)?
//just curious//
re: chmod
Do people actually use the letter code (chmod -R u+rwx,g=w,o=r foobar)?
That's the way I always do it. It was just easier for me to memorize that way instead of the numbers.
----
You talk the talk, but do you waddle the waddle?
chmod with numbers
If one understands binary encoding, the number syntax is actually simpler and easier to remember. So, that's what I do at the command line--typically when I have an ssh connection to my server.
But often I'm lazy, and I don't want to think--if I have only a few chmod changes, then I just do it in the Konqueror file manager. I'm not a command line gorilla like some I've seen--I have a GUI and I'm not afraid to use it.
re: chmod with numbers
Sounds like a Jinx.com sticker/shirt!
re: chmod with numbers
Sounds like a Jinx.com sticker/shirt!
Haha, I'd wear it.
Letters stick in my memory but GUI is good too
I use the letter code. The letters have a meaning and that makes them memorable.
I'm not afraid to use the GUI either, if it's up to the job (like a single or small number of files) - but I use Midnight Commander because it is more functional for that particular task. chown is the command where you are more likely to need the command line.
-----
I try to take one day at a time -- but sometimes several days attack me at once - Ashleigh Brilliant
chmod cheat sheet
I was cleaning out some old file directories tonight and came across this chmod using numbers cheat sheet.
I remember taping this to the frame of my monitor (it was a big clunky 19" crt so it gives you an idea of how old this is), so now of course it's burnt into my brain.
Sorry about the formatting, I can't seem to get it to leave the fixed spaces in place without showing the line break code.
Very useful
Thanks for that tip. I've added another post-it to the monitor. This layout may help to burn the code into memory:
Sorry, I could not get rid of the line break indicators - they inserted themselves.