[Solved] Missing .bashrc file from /etc/skel/

Forum rules
Before you post please read how to get help

[Solved] Missing .bashrc file from /etc/skel/

Postby RobertLM78 on Wed Nov 07, 2012 2:57 pm

I'm still a complete noob when it comes to bash :shock: :oops: . Anyway, I'm trying to establish some aliases for use in the terminal, and created a .bash_aliases file in my home folder, but I think that the aliases aren't working since the .bashrc is non-existant in the /etc/skel/ folder. Is this a bug in Mint, by design, or simply something that is left for the user to create (the missing .bashrc file, that is) ?
Thanks for reading!
Last edited by RobertLM78 on Thu Nov 15, 2012 3:45 pm, edited 1 time in total.
Dell Dimension 4600i, ATI Rage 128, 1 GB RAM, Linux Mint 13 32-bit, MATE edition
Dell Latitude D400, Intel Graphics, 1 GB RAM, Linux Mint 13 32-bit, MATE edition
Gateway DX4860, Sapphire Radeon HD 5450, 6 GB RAM, Linux Mint 13 64-bit, MATE edition
User avatar
RobertLM78
Level 3
Level 3
 
Posts: 167
Joined: Sat Apr 28, 2012 4:19 am
Location: US

Linux Mint is funded by ads and donations.
 

Re: Missing .bashrc file from /etc/skel/

Postby xenopeek on Wed Nov 07, 2012 5:10 pm

There is no default .bashrc. So you won't find a .bashrc in /etc/skel (where the default preferences files are kept, to be copied to a new user's home folder when you create said user). You can create a .bashrc in your home folder, and as you can see in your .profile file it will be loaded from there upon login. If you make changes to the .bashrc file or the .bash_aliases, you will have to load those files manually (with the dot command, so ". .bashrc") to load them in your terminal session or just logout and login.

If you want to create the .bashrc, put the following in it at least:
Code: Select all
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

You can of course also put the alias commands directly in your .bashrc file, as the above does nothing else but load the .bash_aliases file and continue loading bash settings from there (not limited to aliases). Perhaps also this post will help: http://stefaanlippens.net/bashrc_and_others. Sheds some lights on what file does what.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15280
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Missing .bashrc file from /etc/skel/

Postby RobertLM78 on Wed Nov 07, 2012 5:36 pm

Awesome! Thank you Vincent, you've given me some food for thought, and now I know why there wasn't a .bashrc file as well :D. Looks like I have some reading to do, thanks for the link, too :mrgreen: !
Dell Dimension 4600i, ATI Rage 128, 1 GB RAM, Linux Mint 13 32-bit, MATE edition
Dell Latitude D400, Intel Graphics, 1 GB RAM, Linux Mint 13 32-bit, MATE edition
Gateway DX4860, Sapphire Radeon HD 5450, 6 GB RAM, Linux Mint 13 64-bit, MATE edition
User avatar
RobertLM78
Level 3
Level 3
 
Posts: 167
Joined: Sat Apr 28, 2012 4:19 am
Location: US


Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 0 guests