Linux Startup Files

Posted by {"display_name"=>"greg", "login"=>"greg", "email"=>"greg@udon.org", "url"=>""} on January 27, 2014 · 1 min read

Depending upon the shell and the user interface you've chosen, here are there shell startup files that will execute on your Linux system.There is also a system wide environment setting at:

/etc/environment

bash

An interactive, non-login bash shell will copy the parent environment and execute:

~/.bashrc

Non-interactive shells only inherit the environment of the parent. Many distributions use /etc/bashrc for system-wide non-interactive shells.

/etc/profile
/etc/profile.d
/etc/bashrc
~/.bash_profile
~/.bash_login
~/.profile
~/.bashrc

In addition to the shell startup scripts, your desktop environment can specify startup commands. Gnome, KDE and other standardize on:

~/.config/autostart (for a user)
/etc/xdg/autostart (systemwide)