LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 08-30-2003, 07:54 PM   #1
Hultenius
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Rep: Reputation: 0
Problems with commands


Hi.

Im quite new to linux and have a problem.

I got a dedicated linux-server yesterday and everything worked fine. I ordered an additional IP and typed "netconfig --bootproto none --ip xxx.xxx.xxx.xxx --netmask 255.255.252.0 --device eth0:".

To restart the network i typed "/etc/init.d/network restart" but the network never came back so i had to remotely reset the power to restart the server. Everything started upp fine and the IP worked.

However, the command "netconfig" didn't work anymore. Now i have to type "/usr/sbin/netconfig".

Today, i tried to install RRDtool. I unzipped all files and typed the commands as i was told to:
Quote:
sh configure
make
make install
No errors but the command "rrdtool" didnt work. I had to type "/usr/local/rrdtool-1.0.45/bin/rrdtool".

I also tried to install another program. Same problem, the command didn't work.

Does someone know what is wrong? Can it be solved?

Very pleased for help

edit:
and yes, i was logged in as root the whole time.

Last edited by Hultenius; 08-30-2003 at 07:57 PM.
 
Old 08-30-2003, 11:09 PM   #2
nastrand
LQ Newbie
 
Registered: Dec 2002
Location: Canada
Distribution: Slackware 9.0
Posts: 5

Rep: Reputation: 0
Type $PATH into a shell. If you don't see /usr/sbin then add it by typing export PATH=/usr/sbin:$PATH
 
Old 08-30-2003, 11:12 PM   #3
gizmogadgetus
Member
 
Registered: Aug 2003
Location: Texas
Distribution: Fedora Core 2
Posts: 71

Rep: Reputation: 15
sounds like a problem with your path. Make sure all the directories that contain binaries you want to execute as a single command are in your path in your bash_profile (if you're running bash as your shell). Alternatively, you can create links to the executables in a directory that already exists in your path. If you want to see what's in your path type echo $PATH at the command line for the user your trying to run as.
 
Old 08-30-2003, 11:16 PM   #4
gizmogadgetus
Member
 
Registered: Aug 2003
Location: Texas
Distribution: Fedora Core 2
Posts: 71

Rep: Reputation: 15
try not to use export command

If you use the export command, you will have to do this everytime an action that reads the profile happens (new shells, logging out/in, rebooting machine, etc...) If you don't want the hassle of typing this over and over, edit the shell profile and add it there. There should already be an entry that you can edit.
 
Old 08-31-2003, 06:13 AM   #5
Hultenius
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you very much!

When i type $PATH i got this:
Quote:
bash: /usr/lib/courier-imap/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/user/bin: No such file or directory
netconfig worked when i typed "export PATH=/usr/sbin:$PATH".

Now my second question, what to do in bash_profile? I tried to open /root/.bash_profile but i dont understand what to edit
Quote:
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME="root"

export USERNAME BASH_ENV PATH
Except of "export PATH=/usr/sbin:$PATH", i also want "export PATH=/usr/local/rrdtool-1.0.45/bin:$PATH" to be excuted at start.

Thanks.
 
Old 08-31-2003, 10:44 AM   #6
gizmogadgetus
Member
 
Registered: Aug 2003
Location: Texas
Distribution: Fedora Core 2
Posts: 71

Rep: Reputation: 15
in the section of the profile above change the line that says:
PATH=$PATH:$HOME/bin
to say
PATH=/usr/sbin:/usr/local/rrdtool-1.0.45/bin:$PATH:$HOME/bin
and that should do it
 
Old 09-02-2003, 06:05 AM   #7
Hultenius
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Original Poster
Rep: Reputation: 0
once again, thx
 
  


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
Having problems with RSH commands bbalzer Linux - General 2 11-03-2005 05:58 AM
Having problems figuring out these commands Dandy Linux - Newbie 2 04-18-2004 10:21 PM
Problems using commands in RedHat 9 Otaking Linux - Newbie 3 04-07-2004 08:16 PM
Having problems with commands ImAnEwBiE Linux - Newbie 4 08-03-2003 10:17 PM
Having problems with commands nero64 Linux - Newbie 1 11-27-2002 08:02 PM

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

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