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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-06-2008, 01:03 PM
|
#1
|
Member
Registered: Oct 2007
Distribution: CentOS 5
Posts: 39
Rep:
|
problem with echoing variables
hi
i edit the /etc/profile and set a new variable and exported it and i tried to echo this variable but I got nothing and when i checked the exit status i got 0 which mean good in linux
CAN ANYBODY HELP ME PLEASE !!!
|
|
|
01-06-2008, 01:10 PM
|
#2
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
Did you source /etc/profile or logout and back in again after setting the variables?
|
|
|
01-06-2008, 01:14 PM
|
#3
|
Member
Registered: Oct 2007
Distribution: CentOS 5
Posts: 39
Original Poster
Rep:
|
no
i su to root then get back again to normal user using su command
|
|
|
01-06-2008, 01:43 PM
|
#4
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
Try what I mentioned above and see if that helps.
|
|
|
01-08-2008, 01:35 AM
|
#5
|
Member
Registered: Oct 2007
Distribution: CentOS 5
Posts: 39
Original Poster
Rep:
|
well i used ssh command and it works correctly...
but can i know what is the diffrence between ssh command an su command
|
|
|
01-08-2008, 02:42 AM
|
#6
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
Did you use
? The minus sign is equivalent to the -l or --login option, which forces to act as a new login and sources all the initialization files. Otherwise, the environment of the previous user is mantained!
|
|
|
01-08-2008, 12:45 PM
|
#7
|
Member
Registered: Oct 2007
Distribution: CentOS 5
Posts: 39
Original Poster
Rep:
|
yes, It works great I'm very thankful for your help
|
|
|
All times are GMT -5. The time now is 02:19 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|