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 12-04-2009, 08:38 AM   #1
malli42108
Member
 
Registered: Jul 2009
Posts: 37

Rep: Reputation: 15
.profile issue.


hi experts,

i added one line in my personnel .profile, how it should be stored permanently?
$ vi .profile
#!/bin/ksh
EDITOR=nedit
ls=/usr/bin/ls
. /ap/dsl/env/profiles/.profile.common
export LD_LIBRARY_PATH =$LD_LIBRARY_PATH:/home/users/apujahar/STC/Spirent_TestCenter_3.30/Spirent_TestCenter_Application:wq!
$ echo $LD_LIBRARY_PATH
/usr/lib:/usr/dt/lib:/usr/openwin/lib:/usr/lib:/usr/5lib:/usr/lang/SC1.0:/ap/local/5:/ap/local/lib :/home/users/apujahar/STC/Spirent_TestCenter_3.30/Spirent_TestCenter_Application

but when i closed this session and opened new session added line in profile doesn't appeared. how to store it and display it in all other sessions and servers?

$ echo $LD_LIBRARY_PATH
/usr/lib:/usr/dt/lib:/usr/openwin/lib:/usr/lib:/usr/5lib:/usr/lang/SC1.0:/ap/local/5:/ap/local/lib
 
Old 12-04-2009, 08:46 AM   #2
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 79
use either ZZ or wq! in vi to save and quit

also have a look here:
http://staff.washington.edu/rells/R110/#basics7

Last edited by bret381; 12-04-2009 at 08:47 AM.
 
Old 12-04-2009, 08:58 AM   #3
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707

Rep: Reputation: 55
Hi malli42108,

Quote:
Originally Posted by malli42108 View Post

export LD_LIBRARY_PATH =$LD_LIBRARY_PATH:/home/users/apujahar/STC/Spirent_TestCenter_3.30/Spirent_TestCenter_Application:wq!
I recommend you to add this path in ~/.bashrc file, as this file will be reloaded whenever you open a new terminal.

Then execute
Code:
source ~/.bashrc
Quote:
but when i closed this session and opened new session added line in profile doesn't appeared. how to store it and display it in all other sessions and servers?
This is really strange...After saving the file, and if you have write access to the file, how can the contents get disappear ?

Hope it helps .....
 
Old 12-04-2009, 10:17 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681
I don't agree with using ~/.bashrc, because when launching a new bash terminal (subshell), the path will have the same paths added again.

You need to log off and on again for ~/.profile to be read; or use the -i option when starting another session or source it just after editing it.

Also, it seems that the OP uses the ksh as default, so ~/bashrc won't be sourced.

Last edited by jschiwal; 12-04-2009 at 10:18 AM.
 
  


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
Issue with .profile settings ZAMO Linux - General 4 01-22-2009 09:56 AM
Profile Issue bullet45 Linux - Server 0 01-19-2007 12:22 PM
Issue With /etc/profile And dircolors For All Users Chryzmo Slackware 5 12-01-2005 09:10 PM
Samba Config / XP Profile Issue bLaDe Linux - Networking 3 04-16-2004 09:47 PM
Mozilla profile issue firefightin4fun Linux - Newbie 0 09-20-2003 08:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:04 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