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.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 2 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
2 comments… add one
  • Robert de Bock Dec 14, 2007 @ 13:24

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

    ls -ld .*

    That should also work.

  • 🐧 nixCraft Dec 15, 2007 @ 7:59


    Thanks for simplified version

    I appreciate your comment.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum