LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-21-2005, 06:04 PM   #1
MalachiX
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, 06:27 PM   #2
jtshaw
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, 06:33 PM   #3
AltF4
Member
 
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":

/bin/bash
The bash executable
/etc/profile
The systemwide initialization file, executed for login shells
~/.bash_profile
The personal initialization file, executed for login shells
~/.bashrc
The individual per-interactive-shell startup file
~/.bash_logout
The individual login shell cleanup file, executed when a login
shell exits
 
  


Reply


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 02:10 PM
Where to add ip aliases on configuration on boot Anibal Slackware 7 03-09-2004 03:45 AM
Make Screen respect bash aliases VxJasonxV Linux - Software 8 02-05-2004 03:00 AM
BASH export command galalleni Slackware 4 09-08-2003 12:44 AM
BASH variable export Barbarian Programming 2 11-27-2001 08:37 PM


All times are GMT -5. The time now is 02:28 PM.

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