Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm using Ubuntu 13.04, and have set up some custom functions in ~/.bashrc.

The custom functions work fine when I open a terminal within the GNOME environment.

When I switch over to a virtual console (with Ctrl+Alt+F1), I don't get those functions.

How can I resolve this issue?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

Edit your ~/.profile or ~/.bash_profile to include the line:

[[ -f ~/.bashrc ]] && . ~/.bashrc
share|improve this answer
    
Thanks, putting on ~/.bash_profile works. But it doesn't work when I put on ~/.profile. Do you have any idea why it's not reading up ~/.profile ? –  Sibi Jan 20 at 18:19
2  
Read the bash man page (section about start-up files): if .bash_profile exists, bash will use it and ignore .profile. –  glenn jackman Jan 20 at 18:21
add comment

For more information about config files used by BASH please check below links

  1. Bash's behaviour

  2. The Bash Shell Startup Files

  3. Bash Startup Files
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.