You are not logged in.
I guess this is the appropriate subforum.
I've noticed a while ago that aliases from ~/.bashrc have only worked in X.Org-based emulators for me, but not in ttys. The ones in /etc/bash.bashrc work fine there.
Last edited by GeneralFailer (2017-01-20 12:42:27)
Offline
How do you log in? Is ~/.bashrc sourced by your login shell?
Offline
Please post your ~/.bashrc
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
How do you log in? Is ~/.bashrc sourced by your login shell?
It's not in /etc/profile, so I guess it isn't. This seems counter-intuitive, shouldn't this be noted in the wiki?
https://wiki.archlinux.org/index.php/Bash#Aliases
Offline
/etc/profile is not relevant to that question. If you login via a getty and have bash as your default shell, then your ~/.bashrc is sourced. JWR's question was likely getting at one whether bash is your default shell, or if you had switched to zsh or fish, or something else, or two whether you've replaced agetty and/or systemd/logind's control of the ttys.
If you don't know what any of the above mean, then you almost certainly are using stock logind, agetty, and bash - in which case your bashrc is sourced. This then leads to my request to see your bashrc. I suspect there is a conditional within the file that is preventing the aliases from being processed.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
/etc/profile is not relevant to that question. If you login via a getty and have bash as your default shell, then your ~/.bashrc is sourced. JWR's question was likely getting at one whether bash is your default shell, or if you had switched to zsh or fish, or something else, or two whether you've replaced agetty and/or systemd/logind's control of the ttys.
If you don't know what any of the above mean, then you almost certainly are using stock logind, agetty, and bash - in which case your bashrc is sourced. This then leads to my request to see your bashrc. I suspect there is a conditional within the file that is preventing the aliases from being processed.
No, everything should be default.
A simple one like "alias da='date "+%A, %B %d, %Y [%T]"'" isn't processed after relogin either.
EDIT:Probably unrelated, but tty1 is unavailable for me, which I assumed was because of lightdm.
Last edited by GeneralFailer (2017-01-20 02:23:04)
Offline
I've asked you to share your ~/.bashrc twice. If you will not provided the information requested it is highly unlikely that anyone could help you, and even less likely that anyone will bother to try.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
jasonwryan wrote:How do you log in? Is ~/.bashrc sourced by your login shell?
It's not in /etc/profile, so I guess it isn't.
/etc/profile is global and sources the global /etc/bash.bashrc for interactive login shells. Locally, in your home directory, you should have the default (copied from /etc/skel) .bash_profile that sources the local .bashrc.
Offline
I've asked you to share your ~/.bashrc twice. If you will not provided the information requested it is highly unlikely that anyone could help you, and even less likely that anyone will bother to try.
I was trying to say that even one with just "alias da='date "+%A, %B %d, %Y [%T]"'" didn't work.
/etc/profile is global and sources the global /etc/bash.bashrc for interactive login shells. Locally, in your home directory, you should have the default (copied from /etc/skel) .bash_profile that sources the local .bashrc.
I didn't have one in either of my home dirs, weird. Thanks for the help.
EDIT: Is it normal that it was always sourced by xfce4-terminal then?
Last edited by GeneralFailer (2017-01-20 12:43:53)
Offline
GeneralFailer wrote:jasonwryan wrote:How do you log in? Is ~/.bashrc sourced by your login shell?
It's not in /etc/profile, so I guess it isn't.
/etc/profile is global and sources the global /etc/bash.bashrc for interactive login shells. Locally, in your home directory, you should have the default (copied from /etc/skel) .bash_profile that sources the local .bashrc.
you can also source $home/.bashrc in /etc/bash.bashrc which is relitive so does not mix for user specifics.
Last edited by bleach (2017-01-20 12:51:17)
Offline