3

I'm new to Ubuntu and currently on it for assignment

I need to run source ~/.bashrc at the first start of Ubuntu to enably my alias at the starting of the program.

I've checked that I need to modify the .bash_login or .bash_profile but when I checked with ls -al, I couldn't find both of the file, I got .profile, .bash_logout, .bash_aliases, and .bash_history

My question is, anything wrong with my system or it is hidden somewhere

A question aside, how can I start source ~/.bashrc at first run?

Unknown
  • 195
  • 3
  • 4
  • 9
  • 1
    How did you create the user you're now using? The .bashrc file should be installed in the user's home directory (copied from /etc/skel), but this may be omitted if the user is created in an unusual way or marked as a system user for example. – gertvdijk Aug 26 '13 at 19:35
  • There's only one user for now, which is me. "User created in an unusual way?" Possible? My /etc/skel has .bash_login, .profile, and .bashrc. And I'm running on Virtual Box not dual boot. – Unknown Aug 26 '13 at 19:46
  • Again: How did you create that user? Was it already there after installation? If so, how did you install Ubuntu? Using a regular ISO or did you download a virtual appliance of some sort? We really need more information here. Also, the Bash system-wide configuration is here: /etc/bash.bashrc, which is being called for users without a ~/.bashrc if I'm correct. – gertvdijk Aug 26 '13 at 19:50
  • I'm using Virtual Box and during installation, Ubuntu ask for the user account. And that's where I created the account. I'm using the Ubuntu 13.04 ISO file to install on VM. – Unknown Aug 26 '13 at 19:52
  • @gertvdijk he never said he's missing .bashrc. He said he wants to run source ~/.bashrc upon login, and in order to do that, he read somewhere that he needs to add that command to .bash_login or .bash_profile, but he can't find those files. Right, @Unknown? You can see .bashrc in your home directory when you do ls -al, correct? You just can't find .bash_login and .bash_profile. – Alaa Ali Aug 26 '13 at 20:03
  • @Unknown source ~/.bashrc is already being called by default when booting. You'll see it being called by .profile (you'll see . ~/.bashrc, which is the same as source ~/.bashrc). Also, .bashrc then calls .bash_aliases if it exists, which is where you would put your aliases. Is this what you are seeking? Or did you put your aliases directly into .bashrc? It doesn't matter though, it'll still work. – Alaa Ali Aug 26 '13 at 20:09
  • @Alaa Uhm, read again. "when I checked with ls -al, I couldn't find both of the file [...]" – gertvdijk Aug 26 '13 at 20:12
  • @gertvdijk Uhm, read again. Both of the files = .bash_login and .bash_profile. – Alaa Ali Aug 26 '13 at 20:13
  • @Alaa Yes, you're right. I've wrote my alias on .bashrc file and not into .bash_aliases file.But still the my alias doesn't work at during first start. It work when I manually type source ~/.bashrc – Unknown Aug 26 '13 at 20:49
  • @qertvdijk I'm sorry if I didn't make my question clear. My both files is the .bash_login and .bash_profile. – Unknown Aug 26 '13 at 20:50
  • Let's continue this in chat. – Alaa Ali Aug 27 '13 at 04:49

0 Answers0