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:
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. |
Type $PATH into a shell. If you don't see /usr/sbin then add it by typing export PATH=/usr/sbin:$PATH
|
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.
|
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.
|
Thank you very much!
When i type $PATH i got this: Quote:
Now my second question, what to do in bash_profile? I tried to open /root/.bash_profile but i dont understand what to edit :confused: Quote:
Thanks. :) |
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 |
once again, thx :)
|
All times are GMT -5. The time now is 03:42 PM. |