Skip to content

Instantly share code, notes, and snippets.

@myfingerhurt
Created October 5, 2021 06:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save myfingerhurt/6ffdd68a04f1b364205c72a2add28ea3 to your computer and use it in GitHub Desktop.
Save myfingerhurt/6ffdd68a04f1b364205c72a2add28ea3 to your computer and use it in GitHub Desktop.
Choosing between .bashrc, .profile, .bash_profile,

For better understanding, you may need inotifywait to verify it by yourself, mine is running under Ubuntu 20.04 LTS.

  1. Install sudo apt-get install -y inotify-tools
  2. Run inotifywait in a tmux tab as below.
  3. Start a new pane in tmux by CTRL^B + "
  4. You may see .bash_profile get OPENED
  5. Exit the tmux pane.
  6. You may see .bash_logout get OPENED
$ inotifywait -mr -e OPEN ./.profile ./.bashrc ./.bash_profile ./.bash_logout                                                              
Setting up watches.  Beware: since -r was given, this may take a while Watches established.                                                  
                                                                      
./.bash_profile OPEN                                                  
./.bash_logout OPEN      
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment