You are not logged in.
Hi.
Sorry for being a completely daft new user to archlinux with my simple questions..
But here goes nothing!
Why doesn't my ~/.bashrc work? It's like it's not even used.
It looks like this:
[root@openvpnserver ~]# cat ~/.bashrc
export VISUAL=nano
export EDITOR=nano
Cheers in advance!
Last edited by Torxed (2013-03-05 07:19:41)
Offline
Because you are logged in as root?
Offline
Because you are logged in as root?
And i still want a bashrc for my root session?
GNU nano 2.2.6 File: /root/.bashrc
Offline
If you are logged in as root, your .bashrc should be in /root/ (or a symlink to ~/.bashrc)...
Offline
As i posted, it is in root (i don't want to be rude but read my last post)...
Last edited by Torxed (2013-03-05 07:07:06)
Offline
Coolios, this was the missing piece in the puzzle.
Per default, the skel files are not copied to the root dir (for good reasons IMO), so the .bash_profile file was missing which, is the file that launches the .bashrc.
Dunno why i don't just put the bashrc content right into the bash_profile file tho? i really hate nested files that doesn't have any real meaning or thought behind it on "simple" systems as mine.
Sleek, fast and neat is way better then trying to follow a flow of files nested in a chain of executions.
[root@openvpnserver]# cat ~/.bash_profile
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
Last edited by Torxed (2013-03-05 07:19:19)
Offline
FWIW, I read your post, but
And i still want a bashrc for my root session?
GNU nano 2.2.6 File: /root/.bashrc
Is a question and doesn't actually tell me much; and seeing my mind reading skills are fading at a faster rate than my memory...
If you are going to export environment variables, you should put them in your .profile or .bash_profile.
Offline
FWIW, I read your post, but
And i still want a bashrc for my root session?
GNU nano 2.2.6 File: /root/.bashrcIs a question and doesn't actually tell me much; and seeing my mind reading skills are fading at a faster rate than my memory...
If you are going to export environment variables, you should put them in your .profile or .bash_profile.
Didn't mean to sound condescending, my apologizes!
The code-block was a copy-paste from the nano session in which the content of .bashrc was first given in the first post, might be a bit unclear for normal geeks using vi or emacs :P
Thank you for the tip, moved the exports to the .bash_profile!
Offline
Coolios, this was the missing piece in the puzzle.
Per default, the skel files are not copied to the root dir (for good reasons IMO), so the .bash_profile file was missing which, is the file that launches the .bashrc.Dunno why i don't just put the bashrc content right into the bash_profile file tho? i really hate nested files that doesn't have any real meaning or thought behind it on "simple" systems as mine.
Sleek, fast and neat is way better then trying to follow a flow of files nested in a chain of executions.[root@openvpnserver]# cat ~/.bash_profile # # ~/.bash_profile # [[ -f ~/.bashrc ]] && . ~/.bashrc
Well, ~/.bash_profile is read when you log in. If you launch X and then open a terminal, you're already logged in, so ~/.bashrc is read instead. Mostly, these days, most folk'll jump straight into X and stay there. Anyway, there are some things best put into ~/.bash_profile before you source ~/.bashrc, so that they don't get "read in" every time you open a terminal (modifying $PATH comes to mind).
EDIT: and as jasonwryan says: your other environment variables as well.
Last edited by Antoine (2013-03-05 12:28:10)
Offline