≡ Menu

Explain Linux / UNIX dot-files

Q. Can you tell me more about dot-files that shell and many UNIX command reads?

A. A dot file is nothing but a configuration file usually stored in users home directory. Dot files are used to configure the settings for many UNIX / Linux programs such as:
=> Bash / csh / ksh shell
=> Vi / Vim and other text editor
=> And many other applications

Usually UNIX like operating system is configured with hundreds of file located at /etc/ or /usr/local/etc or other special directories. Each application has a unique format. User can override many application defaults by creating their own configuration file in home directory. To hide configuration file from normal listing of the home directory, the name of the config file / directory prefixed with a dot (period). Thus, you got name dot file.

You can list dot files using ls command:
$ ls -a
$ ls -ld .*
$ ls -a | grep '^\.'



You can edit or update all dot files with standard text editor. You can also browse other users configuration file online here.

Share this tutorial on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:

{ 2 comments… add one }
  • Robert de Bock December 14, 2007, 1:24 pm

    Good to explain such common things, but your command (using ls and grep) could be simplified:

    ls -ld .*

    That should also work.

  • nixCraft December 15, 2007, 7:59 am


    Thanks for simplified version

    I appreciate your comment.

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , , , , ,