Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My system has 132 directories whose names end in .d
There are also two scripts whose names end in .d

Aside from the two wayward scripts ('/usr/sbin/invoke-rc.d', '/usr/sbin/update-rc.d'), I assume that .d means directory... (but I do wonder why those scripts are so named).

In some cases, the .d directory's parent folder contains a file of the same name, but without the .d ending.

# eg.

Is there some mystical Linux rationale to this naming style?

Is it a deeply entrenched naming convention, or is it about as absolute as 'foo' and 'bar'?

share|improve this question
Many linuxers wonder too. – Nikana Reklawyks Oct 29 '12 at 6:49
up vote 38 down vote accepted

This is often used for directories (hence the "d") that contain a collection of partial configuration files. All files in the directory get combined, sometimes also with other files, to make the complete configuration. This is often done when traditionally there was only one configuration file (e.g. in your example sources.list) but there is a desire to make things more modular later.

As Laurence mentions, the /etc/rc?.d directories was probably one of the first times this custom was used.

share|improve this answer
I would add to this that other names have a "d" appended to a name without the leading dot, but this does NOT mean directory, but "daemon" or service, such as "named" or "httpd". named is the DNS service, while httpd is the web service (Apache, for example). – jfmessier Oct 16 '10 at 0:59
And as for those two "wayward scripts" mentioned in the question: their names are referring to the /etc/rc?.d directories. – Laurence Gonsalves Oct 16 '10 at 1:09
Thanks.. You've all contributed to a good all-round explanation. – Peter.O Oct 16 '10 at 4:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.