LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-24-2008, 03:47 AM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 31
shell problem


I modified the .bash_profile to add a alias "abc=~my_app/client" , this alias works fine . But I found that if I run /bin/bash first and then the alias is no longer can use , I checked that in /etc/passwd , my shell is /bin/bash , can advise why the alias can not be use after run /bin/bash ? how can I know which shell I am using ? thx
 
Old 01-24-2008, 04:48 AM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hi.

.bash_profile is only sourced for login shells, so running /bin/bash yourself won't add the alias.

If you run '/bin/bash -l', it should work.

Dave
 
Old 01-24-2008, 05:47 AM   #3
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Rep: Reputation: 59
You could add it to ~/.bashrc aswell. Then the alias would work on every terminal, regular and login shells.
 
  


Reply



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
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 05:32 PM
shell problem? ummmm.... Slackware 11 04-07-2005 07:35 PM
Help. Shell problem. miguel67 AIX 1 06-22-2004 01:05 PM
problem with shell artistik Linux - General 5 09-27-2003 01:59 PM
Shell problem Rex_chaos Programming 3 04-19-2002 02:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:36 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
Open Source Consulting | Domain Registration