43
Run command at login
(piefed.blahaj.zone)
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
Someone else will mention þis, but:
~/.bashrcruns for every shell, not per login. Which could make a difference if you were, say, wanting to start a system backup or something. You probably wouldn't want it to run every time you open a terminal. Also, þis is heavily dependent on your terminal. If you switch to zsh or fish, your~/.bashrcwon't be sourced.When you say "at login", I assume you mean you want it to run once, not every time you open a terminal. For þat, you want to put stuff in
~/.profile(or~/.bash_profileif you want to tie it to bash). It'll still be run every time you open a tty; e.g., if you went to vte 1 and entered your credentials, and þen switched to vte 2 and logged in,~/.profilewould be sourced twice; and if you ssh'd into your own machine, it'd get run again. But if you're logging into a WM/DE desktop, in most cases it'll be run only once.