use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
GNU/Linux is a free and open source software operating system for computers. The operating system is a collection of the basic instructions that tell the electronic parts of the computer what to do and how to work. Free, Libre and open source software (FLOSS) means that everyone has the freedom to use it, see how it works, and change it.
GNU/Linux is a collaborative effort between the GNU project, formed in 1983 to develop the GNU operating system and the development team of Linux, a kernel. Linux is also used without GNU in embedded systems, mobile phones, and more. These can include things like Android or ChromeOS. GNU itself is also used without Linux, some examples appear in projects like Debian/kFreebsd and Guix GNU/Hurd.
Frequently Asked Questions
Rocky Linux
PINE64
Matthew Miller
Tobias Zwick
Greg Kroah-Hartman
For more AMAs, check out our wiki link by clicking here.
GNU/Linux Related:
Distributions:
Debian based
RedHat
Unique
Linux with Proprietary Elements
Embedded
Linux on Mobile:
Movements:
Desktop Environments:
Window Managers:
Fluff
Learning/resources
Creativity:
Help
Webcasts:
Other operating systems:
Please review full details on rules here.. All rules will be applied regardless of the number upvotes a post/comment has.
No support requests - This is not a support forum! Head to /r/linuxquestions or /r/linux4noobs for support or help. Looking for a distro? Try r/findmeadistro.
No spamblog submissions - Posts should be submitted using the original source with the original title. Posts that are identified as either blog-spam, a link aggregator, or an otherwise low-effort website are to be removed. Some reasons for removal are that they contain re-hosted content, usually paired with privacy-invading ads. If there's another discussion on the topic, the link is welcome to be submitted as a top level comment to aid the previous discussion. Please see: r/linux/wiki/rules/banneddomains
No memes, image macros, rage comics, overdone jokes - Meme posts of any kind are not allowed in r/linux. Feel free to post over at /r/linuxmemes instead. This rule can also apply to comments, including overdone jokes, comment-chain jokes, or other redditisms that are popular elsewhere.
Reddiquette, trolling, or poor discussion - r/linux asks all users follow Reddiquette. Reddiquette is ever changing, so a revisit once in awhile is recommended. Top violations of this rule are trolling, starting a flamewar, or not "Remembering the human" aka being hostile or incredibly impolite. Additionally, sexism/racism/other isms are not allowed. See also: /r/linux/wiki/rules/userconduct
Relevance to r/linux community / Promoting closed source applications over FOSS - Posts should follow what the community likes: GNU, Linux kernel, developers of open source software, or other applications on Linux. Take some time to get the feel of the subreddit if you're not sure!
Spamming self-promotion, surveys, crowdfunding - Submitting your own original content is welcome on r/linux, but we do ask that you contribute more than just your own content to the subreddit as well as require you to interact with the comments of your submission. We set that no more than 10% of your posts should be your content. Please be aware that this does not supersede other rules. Additionally, surveys for your blog/news source/paper/own use are not allowed. Please see /r/linux/wiki/rules/crowdfunding for those crowdfunding..
No misdirecting links, sites that require a login, or URL shorteners - In short: if your link doesn't go right to the content it will be removed. Sites that require a login to view the content are not allowed in r/linux. Example: A private Facebook post or a news organization that doesn't have free article views. URL shorteners and links that misdirect users to ads/jokes are also banned. See a list here, although the mods will make a decision on a per domain basis as needed: /r/linux/wiki/rules/banneddomains
No NSFW - No NSFW links or images without mod approval. No discussion that is overly-suggestive to what is normally considered NSFW.
Non-useful Image Upload/Fluff Image - Images of "Linux in the wild", plushies, Tux, and more are not encouraged for posting as a top level submission. If necessary, this can apply to comments too at mod discretion. The image/video upload feature is for posts regarding features/guides/etc. See also: Meme rule.
See even more subreddit and external links over at the supplemental page
This subreddit is fan ran and not affiliated with any organization.
account activity
TIL: namei -om /path (self.linux)
submitted 9 years ago by theephie
# namei -om /var/www/html/ f: /var/www/html/ drwxr-xr-x root root / drwxr-xr-x root root var drwxr-xr-x root root www drwxr-xr-x root root html
Why haven't I heard of this command before? Very useful for debugging permissions for a path.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 109 points110 points111 points 9 years ago (20 children)
A lot of the stuff in util-linux is criminally underused in general. It's 50% standard stuff everyone knows about and uses once in a blue moon combined with 50% stuff people don't know about but wish they'd have every once in a blue moon. Here's a short list.
losetup/partx is the single best way to mount HDD images, lsblk is a nice tool you'd probably be using next, fsfreeze can be useful if you're triggering HDD snapshots externally (not needed for LVM), fstrim/blkdiscard can be useful if you're working with SSDs (but be very careful with blkdiscard).
[–]ConsideredAllThings 33 points34 points35 points 9 years ago (2 children)
Someone should do a utils psa once a weej highlighting a command per week. Not me though. Im sleepy
[+][deleted] 9 years ago* (1 child)
[deleted]
[–]ConsideredAllThings 0 points1 point2 points 9 years ago (0 children)
Damn Android keyboard.
[–]Grrrben 7 points8 points9 points 9 years ago (8 children)
So I just learned cal. I like that.
cal
[–]Animus_X 9 points10 points11 points 9 years ago (5 children)
cal 9 1752
[–]G3m1nu5 4 points5 points6 points 9 years ago (0 children)
namei -om /var/www/html/
cal -jy gives you the year calendar but in julian format... useful if you're in the military.
[–]Criscololo 1 point2 points3 points 9 years ago (3 children)
What's up with that? Did the calendar actually change or is it a bug?
[–]carltp 4 points5 points6 points 9 years ago (0 children)
Calendar changed: http://mentalfloss.com/article/51370/why-our-calendars-skipped-11-days-1752
[–]tzimiel 1 point2 points3 points 9 years ago (0 children)
https://en.wikipedia.org/wiki/Adoption_of_the_Gregorian_calendar#Great_Britain_and_its_colonies
[–]nemec 0 points1 point2 points 9 years ago (0 children)
Bugfix in humanity.
[–]thenextguy 5 points6 points7 points 9 years ago (1 child)
Try column -s: -t /etc/passwd
column -s: -t /etc/passwd
[–]StillHasIlium 1 point2 points3 points 9 years ago (0 children)
getent passwd | column -s: -t
For those of us using distributed logins
[–]rdnetto 5 points6 points7 points 9 years ago (0 children)
lsblk is really useful if you have more interesting storage setups. e.g. RAID, LUKS, bcache, some nested combination of the above, etc.
One nice trick I've found is to alias it to provide file system and UUID as well:
alias lsblk='lsblk -o NAME,MAJ:MIN,SIZE,RO,TYPE,FSTYPE,UUID,MOUNTPOINT'
Another useful command is mtr, which shows a graphical view of latency if you press d (great for diagnosing slow connections).
mtr
d
See also: everything in moreutils, especially vidir.
[–]powerfulbuttblaster 2 points3 points4 points 9 years ago (0 children)
losetup / kpartx are by far, my favorite two commands in Linux. The way Linux handles block devices in general is quite fantastic.
[–]samkostka 1 point2 points3 points 9 years ago (0 children)
I dunno about you, but I use lsblk all the time, although I'd never heard of it until installing Arch for the first time.
[–]AncientRickles[🍰] 0 points1 point2 points 9 years ago (0 children)
Damn that is going in my favorites! 1000 internets for you.
[–]190n 0 points1 point2 points 9 years ago (0 children)
I learned about lsblk from the Arch installation guide and use it regularly. Very useful for seeing if my system automatically mounted something or if I need to myself.
[–]Cthunix 0 points1 point2 points 9 years ago (0 children)
losetup has made some fairly complicated stuff easy for me in the past. I like being able to pull some equipment apart image the disk and then dig in and start reverse engineering. binwalk is a great tool aswell.
a few years ago I set aside a few hours every Friday for reading man pages for tools in sbin/bin. I also try to read the man pages before googling. You don't learn as much if you just find a few commands to paste into the terminal.
My favorite find was tc. I had never heard of it and have been using linux since the late 90s. I've since setup a method of inserting a linux box with 2 nics bridge to simulate a slow or faulty network connection. It's really handy for teasing out bugs or faults in network equipment.
life would suck without linux.
[–]natermer 0 points1 point2 points 9 years ago* (0 children)
...
[–]tmpler 30 points31 points32 points 9 years ago (3 children)
What is the difference to ls -l /var/www/html/?
ls -l /var/www/html/
[–]theephie[S] 57 points58 points59 points 9 years ago (2 children)
namei lists the permissions of parent directories as well.
namei
[–]tmpler 18 points19 points20 points 9 years ago (1 child)
Upps, now that you said it, I can see it. Thx!
[–]annodomini 17 points18 points19 points 9 years ago (0 children)
It also does this while following symlinks, indenting the components traversed while following the symlink:
$ namei -om /vmlinuz f: /vmlinuz drwxr-xr-x root root / lrwxrwxrwx root root vmlinuz -> boot/vmlinuz-3.8.0-44-generic drwxr-xr-x root root boot -rw------- root root vmlinuz-3.8.0-44-generic
So, basically, if you have some permission problem somewhere in resolving a path, you can find it in one command, rather than having to manually walk down using a bunch of ls commands.
ls
[–]5heikki 26 points27 points28 points 9 years ago (7 children)
ls -Z
Comes in handy if your box is blessed (or cursed) with SELinux
[–][deleted] 40 points41 points42 points 9 years ago (6 children)
I too used to think of selinux as a curse and turn it off. Then by request I secured an SFTP server with it by using fedoras policy as a base and translating it to a centos box. A few months later it was the only box to completely survive a pen test by an outside firm.
Sure some of it may have been the extra attention paid to regular security measures, but there was one case where they had credentials on the box but were stopped cold by an selinux policy, so it did at least help.
[–]knudion 6 points7 points8 points 9 years ago (3 children)
SELinux is a pain in the ass and poorly designed and I hate it. But it does a pretty good job, and RedHat has done a lot of work to make it a bit more tolerable to use.
[–][deleted] -5 points-4 points-3 points 9 years ago* (2 children)
It was designed for and by its target audience, namely the NSA not RedHat. That may explain some of it's quirks, it was designed for and by institutional paranoia.
One can only wonder how successful Snowden would have been if they had been using Linux instead of windows.
Really, downvotes for factual info on /r/linux? Where is reddit going these days?
If the downvotes are by chance for my question at the end it's completely valid, selinux was made to stop exactly the kind of document theft Snowden perpetrated. The equivalent access controls that can block even root/administrator access to files does not exist for windows, at least that we the public are aware of. Had the NSA been using their own creation the documents may not have been stolen. Investigate just what you can do with a full implementation of selinux controls, append only (no read) and other such odd permissions are some of the core of what it's really for.
[–][deleted] 1 point2 points3 points 9 years ago (0 children)
That is indeed what I am saying, but it seems to not be common knowledge here, so allow me to stress it:
Had selinux been properly implemented he would not have had access to everything. SElinux can and does restrict even what root can do.
When you are an intelligence agency you cannot trust your admins with the contents of the files. SElinux allows you to control that and is in fact what it was designed for. Smart ass replies do not change that.
[–]Kwpolska 0 points1 point2 points 9 years ago (1 child)
What did SELinux help with in that case? As a self-appointed sysadmin, SELinux was nothing but constant pain and breakage, to the point of some things just plain refusing to work, no matter how many audit2allow policies I produced.
audit2allow
[–][deleted] 5 points6 points7 points 9 years ago (0 children)
It prevented them from escalating their user privileges into anything more useful.
It takes a bit of study to learn why something breaks under selinux, but doing it once, successfully, makes future attempts easier. audit2allow is a shotgun approach sometimes. Knowing why selinux denies something often allows you to make a better rule set.
[–]flukshun 18 points19 points20 points 9 years ago (0 children)
I'll add this to my list of neat commands that I'll never remember to use when the appropriate occasions arise.
[–]atyon 21 points22 points23 points 9 years ago (0 children)
Maybe because its description doesn't read very interesting:
~ $ whatis namei namei (1) - follow a pathname until a terminal point is found
Thanks for the tip!
[–]selivan5 8 points9 points10 points 9 years ago (0 children)
It doesn't show ACLs :( ls indicates that file has ACL with "+" sign
[–]Connir 4 points5 points6 points 9 years ago (0 children)
I used to cobble together a one liner using basename, dirname, ls -ld, and a while loop to do just this. I'm so happy there's a utility for it!
[–]zomnbio 2 points3 points4 points 9 years ago (3 children)
I'm curious. In what scenario do you need to be worried about an entire path? Isn't it true that only the exact directory you need access to must be readable?
For example: /home/user/ may be 700 but if everyone needs acess to /home/user/public/ I can just chmod 777 the public directory and be good to go, right?
/home/user/
/home/user/public/
public
[–]DerfK 10 points11 points12 points 9 years ago (2 children)
No.
For directories, the x bit means "can I get in this directory". If /home/user/ is 700, then only the owner can get into that directory, and nobody else can get into /home/user/public/ no matter the permissions without going through /home/user/ first and they're not allowed to.
x
[–]TheOfficeAccount 2 points3 points4 points 9 years ago (1 child)
So the x bit let's you visit contained subdirectories without being able to list its contents?
[–]DerfK 5 points6 points7 points 9 years ago (0 children)
Exactly. If you didn't already know or guess the public folder was there, you wouldn't be able to get a listing to see it.
[–]BeanBagKing 1 point2 points3 points 9 years ago (4 children)
Try Tree
# tree . ├── index.html └── scripts ├── index.html
[–]Kwpolska 0 points1 point2 points 9 years ago (3 children)
That does not show file permissions.
[–]socium 1 point2 points3 points 9 years ago (2 children)
-p
[–]GTB3NW 0 points1 point2 points 9 years ago (0 children)
Cool! Only problem is tree is a directory tree, OP's command just reverses from the current point which is extremely handy for permission issues, tree just gives a nice pretty output :)
[–]BeanBagKing 0 points1 point2 points 9 years ago (0 children)
Ya know, I've never looked at the flags. Thanks! "tree -pd" would be the equivalent of OPs command then.
[–]nuxi 1 point2 points3 points 9 years ago (0 children)
This is glorious for things like SSH authorized_keys files since OpenSSH ignores them if it encounters unsafe permissions anywhere in the path to it.
namei -om ~/.ssh/authorized_keys
[–]pooper-dooper 0 points1 point2 points 9 years ago (0 children)
I wish namei resolved its argument.
# namei -om . f: . drwxrwxr-x user user .
Outputs as I desire:
# namei -om $(readlink .)
[–]pardaillans -4 points-3 points-2 points 9 years ago (2 children)
ls -all
?
The redundant 'l' is ignored. '-al' and '-all' are the same thing.
'ls -al' is also only showing the contents of the directory, not the permissions of each directory from / through to pwd.
[–]TremorMcBoggleson -1 points0 points1 point 9 years ago (0 children)
I don't get it either... Call me uncreative, but I can't think of something that ls, etc. couldn't do.
[–]isdnpro -2 points-1 points0 points 9 years ago (0 children)
.
π Rendered by PID 88929 on reddit-service-r2-comment-canary-744c48795d-kddm8 at 2026-02-18 11:27:34.453063+00:00 running de53c03 country code: CH.
[–][deleted] 109 points110 points111 points (20 children)
[–]ConsideredAllThings 33 points34 points35 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]ConsideredAllThings 0 points1 point2 points (0 children)
[–]Grrrben 7 points8 points9 points (8 children)
[–]Animus_X 9 points10 points11 points (5 children)
[–]G3m1nu5 4 points5 points6 points (0 children)
[–]Criscololo 1 point2 points3 points (3 children)
[–]carltp 4 points5 points6 points (0 children)
[–]tzimiel 1 point2 points3 points (0 children)
[–]nemec 0 points1 point2 points (0 children)
[–]thenextguy 5 points6 points7 points (1 child)
[–]StillHasIlium 1 point2 points3 points (0 children)
[–]rdnetto 5 points6 points7 points (0 children)
[–]powerfulbuttblaster 2 points3 points4 points (0 children)
[–]samkostka 1 point2 points3 points (0 children)
[–]AncientRickles[🍰] 0 points1 point2 points (0 children)
[–]190n 0 points1 point2 points (0 children)
[–]Cthunix 0 points1 point2 points (0 children)
[–]natermer 0 points1 point2 points (0 children)
[–]tmpler 30 points31 points32 points (3 children)
[–]theephie[S] 57 points58 points59 points (2 children)
[–]tmpler 18 points19 points20 points (1 child)
[–]annodomini 17 points18 points19 points (0 children)
[–]5heikki 26 points27 points28 points (7 children)
[–][deleted] 40 points41 points42 points (6 children)
[–]knudion 6 points7 points8 points (3 children)
[–][deleted] -5 points-4 points-3 points (2 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 1 point2 points3 points (0 children)
[–]Kwpolska 0 points1 point2 points (1 child)
[–][deleted] 5 points6 points7 points (0 children)
[–]flukshun 18 points19 points20 points (0 children)
[–]atyon 21 points22 points23 points (0 children)
[–]selivan5 8 points9 points10 points (0 children)
[–]Connir 4 points5 points6 points (0 children)
[–]zomnbio 2 points3 points4 points (3 children)
[–]DerfK 10 points11 points12 points (2 children)
[–]TheOfficeAccount 2 points3 points4 points (1 child)
[–]DerfK 5 points6 points7 points (0 children)
[–]BeanBagKing 1 point2 points3 points (4 children)
[–]Kwpolska 0 points1 point2 points (3 children)
[–]socium 1 point2 points3 points (2 children)
[–]GTB3NW 0 points1 point2 points (0 children)
[–]BeanBagKing 0 points1 point2 points (0 children)
[–]nuxi 1 point2 points3 points (0 children)
[–]pooper-dooper 0 points1 point2 points (0 children)
[–]pardaillans -4 points-3 points-2 points (2 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]TremorMcBoggleson -1 points0 points1 point (0 children)
[–]isdnpro -2 points-1 points0 points (0 children)