Help answer threads with 0 replies.
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 08-25-2005, 11:21 AM   #1
LQ Newbie
Registered: May 2004
Posts: 3

Rep: Reputation: 0
It's about editing 'etc/profile'

Hi, I just installed SuSE 9.3 Pro. on Win XP to my Dell Inspiron 1200 using VmWare. After I installed NS2, which is a network simulation program, I typed ' ./install ' at ' /root/ns2/ns-allinone-2.28 ' and the installation was fine. Then I had to edit ' /root/etc/profile' to set up the path for the NS2 program. Below is the edited part.

# Make path more comfortable

if test -z "$PROFILEREAD" ; then

However, when I type ' ns ' after the editing, I got this error message :

' bash: ns: command not found '

But, the command got no problem because....If I copy ' ns ', the exacutive file, from :/root/ns2/ns-allinone-2.28/bin to ' /root/bin ' and type ' ns' It works~~! If I erase the ' ns ' from /root/bin , it is not working anymore.

Q1. I think there was some mistake during editing the profile but I don;t know what it is. please please help me.
Old 08-25-2005, 11:27 AM   #2
Registered: Aug 2005
Location: Italy
Distribution: fedora
Posts: 32

Rep: Reputation: 15
After changes to profile you must close and restart your shell.
Old 08-25-2005, 11:28 AM   #3
Registered: Dec 2003
Location: Chennai, India
Distribution: Arch Linux 0.7
Posts: 393

Rep: Reputation: 30
ive never seen "/user/"...its always "/usr/" ...and most likely you should be editig /etc/profile and not /root/etc/profile..
Old 08-30-2005, 04:29 AM   #4
LQ Newbie
Registered: May 2004
Posts: 3

Original Poster
Rep: Reputation: 0

many thanks to ganja_guru and jojob~

1. I restareted my shell after I change the profile, but still nothing happens.

2. Yes, ganja_guru..u're right its /etc/profile not /root/etc/profile..
but still nothing happens after I change the /etc/profile
Old 08-30-2005, 04:36 AM   #5
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681
Normally, using SuSE, you edit /etc/profile.local instead of /etc/profile.

Also, the script is run when logging in. So either you need to start a shell like /bin/bash -l or log-out and log-in.
Old 08-30-2005, 09:06 PM   #6
Senior Member
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
I do hope that you are not running as root, this is a really bad idea.

Is ns2 installed in /root. If it is, it will only be accessible to the root user, not regular users. Try installing it to /usr/local.

Once you have installed ns2 to /usr/local, try making a symbolic link to the ns2 executable in /usr/bin.
ln -s /usr/local/ns2/ns-allinone-2.28/bin/ns /usr/bin
Assuming that /usr/local/ns2/ns-allinone-2.28/bin/ns is the path to ns.

By making symbolic links, you remove the need to edit your $PATH.

You might need to make a link in a similar fashion to nam (I think)

I hope this helps

Last edited by IBall; 08-30-2005 at 09:07 PM.


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
non roaming profile on a roaming profile system fieldyweb Linux - Newbie 1 10-03-2005 12:27 PM
trying to use Darwin Ports, editing the etc/profile file fyr3 Linux - Newbie 3 09-22-2005 09:41 AM
editing profile.. andox LQ Suggestions & Feedback 2 07-05-2003 06:50 PM
Editing path permanently...but I don't have .bashrc or .profile shock_ez Linux - Newbie 6 07-02-2003 05:16 PM
About Editing the User Profile emmanuelmathew LQ Suggestions & Feedback 2 02-06-2003 03:48 PM > Forums > Linux Forums > Linux - Newbie

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