Manage Settings with dotfiles

Unix Tutorial Unix Tutorial

I’m finally taking the time to adopt a fascinating concept of organising dotfiles properly: track them for source code changes, store them centrally, deploy them automatically on various systems, etc. Dotfiles are configuration files for Unix-like and Linux systems that help you setup most of the tools: text editors, command line interpreters, git and shell aliases, etc.

I’ve learned enough to share this, but will be certainly revisiting this topic soon enough as I’m completing a Unix Tutorial Project on it.

What is a dotfile?

dotfile is a configuration file in Unix. It starts with a dot symbol (.) to make sure that default ls command output won’t show it. So it’s kind of a hidden file. You can create as many dotfiles as you like, but just like any other file, certain rules (like ownership and permissions) apply. Also, you can’t have dotfiles with the same name in the same location, for obvious reasons.

dotfile locations

Vast majority of dotfiles are located in user homedirectories. That’s mostly because there’s not much need to be hiding system wide settings – they’re usuall kept under /etc directory and have no dots or any other ways hiding the content.

For user-specific dotfiles, you’ll have them under your user homedir. For me, that’s /home/greys in Linux and /Users/greys in macOS.

Many projects create dotfiles upon first start, so that means if a group of users is using the same software, each user will have their own configuration file with individual preferences – stored in their own directory.

Examples of dotfiles

Here’s just a few of the dotfiles I have:

  • .bashrc – one of initialisaiton files for Bash
  • .bash_profile – similar file in macOS
  • .vimrc – this is the ViM editor config file
  • .gitconfig – configuration file for git
  • .tmux.conf – config file for tmux

Are the dot directories as well?

Sure thing! In fact, for many larger projects default to organising their configuration in specific hidden directories, like .vim or .ssh or .vnc

That’s it for today! Will share my dotfiles Unix Tutorial Project shortly!

See Also

Contact Me

Follow me on Facebook, Twitter or Telegram:
I learn with Educative: Educative
IT Consultancy
I'm a principal consultant with Tech Stack Solutions. I help with cloud architectrure, AWS deployments and automated management of Unix/Linux infrastructure. Get in touch!
Recent Articles
24 Mar 2024

Homelab: Mac Pro 2013 32GB

30 Sep 2023

macOS Sonoma 14.0

26 Sep 2023

Video: What Browser Do You Use?

Recent Tweets