8 ms·
Bash Initialisation Files
- ColinWright 14y agoPrompted to submit this because of this item: http://news.ycombinator.com/item?id=4369485 http://news.ycombinator.com/item?id=4369485
- gosub 14y agoIt would be very cool if there was a similar graph for the entire boot process: from grub to init to rc.d/systemd to login to bash.
- ColinWright 14y agoNot hard to produce - the most difficult bit is finding someone, anyone, who actually has the information!
- planckscnst 14y agoYou can use systemctl dot It shows the dependency graph of your unit files.
- ColinWright 14y agoThanks - looks interesting. Not installed on my system - I'll have to go investigate that in my copious free time.
- keeperofdakeys 14y agoIt should be noted this is for systems that use Systemd, which as far as I'm aware of, is only Fedora at this stage.
- deleted 14y ago[deleted]
- mrud 14y agoOpenSuse also ships with systemd per default. Other distributions like Arch or Debian support systemd as well. http://www.bootchart.org/ http://www.bootchart.org/ is also quite interesting to understand the boot process better and profile it.
- keeperofdakeys 14y agoAh, I had a suspicion OpenSuse would, as it follows Fedora quite closely. Bootchart is also quite interesting.
- hythloday 14y agoThis is a great start but I'd love to know e.g. exactly what qualifies as a login shell and what calls the shell with these various arguments.
- mikelward 14y agoAny shell started with a minus as the first character of argv[0] is a login shell e.g. "-bash" is a login shell. Many things start your shell this way: * the "login" command e.g. logging on an a virtual console * "su -" * "sshd" e.g. ssh <hostname> * xterms, depending on the settings e.g. the original xterm if you run "xterm -ls" or you run "xterm" with "xterm*loginShell: true" in your ".Xdefaults" or ".Xresources" * some X initialization scripts, e.g. when logging in to a "Default" session via gdm or kdm (how exactly this works depends on your distribution some explicitly source .profile instead) With "bash" you can also manually create a login shell using "bash -l" or "bash --login".
- deleted 14y ago[deleted]
- ralph 14y agoAlso sudo. $ sudo -i # tr \\0 \\n </proc/$$/cmdline -bash #
- telemachos 14y agoA side note to mikelward's answer for OSX users: by default Terminal.app starts all shells as login shells[1]. You can easily change this behavior, but it's the default and many people never even know it's set that way. This is different from defaults on many (most?) Linux systems, and so people coming from one direction to the other often become confused about where to put startup information. (I suppose it's not exactly a Linux versus OSX thing. It has more to do with window managers and how you start up your machine. If you log into Gnome, KDE or similar environments though, most terminal windows you start in the GUI are not login shells. So people get used to that behavior.) [1]: http://cl.ly/If85 http://cl.ly/If85
- deleted 14y ago[deleted]
- rbanffy 14y agoI'm with Henry Spencer on this. "Those who don't understand Unix are condemned to reinvent it, poorly."
- sciurus 14y agoIf you want to understand this more, read "Bash Startup Files" and "Interactive Shells" from the Bash Reference Manual. http://www.gnu.org/software/bash/manual/bashref.html#Bash-Startup-Files http://www.gnu.org/software/bash/manual/bashref.html#Bash-St... http://www.gnu.org/software/bash/manual/bashref.html#Interactive-Shells http://www.gnu.org/software/bash/manual/bashref.html#Interac...
- Kenan 14y agoSo where does Git Bash for Windows fall into here?