Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-21-2005, 07:04 PM   #1
LQ Newbie
Registered: Feb 2005
Location: Miramar
Distribution: Fedora Core 3
Posts: 13

Rep: Reputation: 0
How to export stuff and add aliases in bash

I added some aliases and exported a few ports in my .bash_profile. However when I open gnome-terminal, aterm, or xterm it does not recognize them.

I have to do source ".bash_profile" everytime I reboot in order for them to be recognized, I'm sure there is a way for this to be handled automatically, can someone enlighten me?
Old 03-21-2005, 07:27 PM   #2
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
but then in .bashrc instead of .bash_profile.
Old 03-21-2005, 07:33 PM   #3
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
-) *profile* - files are executed for "login-shells", used to "export" variables
-) .bashrc should be the file you need (any interactive shell), used to define aliases, etc.

From "man bash":

The bash executable
The systemwide initialization file, executed for login shells
The personal initialization file, executed for login shells
The individual per-interactive-shell startup file
The individual login shell cleanup file, executed when a login
shell exits


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash aliases won't autostart? Ollir Mandriva 7 08-22-2004 03:10 PM
Where to add ip aliases on configuration on boot Anibal Slackware 7 03-09-2004 04:45 AM
Make Screen respect bash aliases VxJasonxV Linux - Software 8 02-05-2004 04:00 AM
BASH export command galalleni Slackware 4 09-08-2003 01:44 AM
BASH variable export Barbarian Programming 2 11-27-2001 09:37 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:27 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration