Hi. Pls is there a way to make commands in my /sbin to work in my bash permanently.
like using the service and chkconfig commands, i have to use /sbin/service instead of just service
Printable View
Hi. Pls is there a way to make commands in my /sbin to work in my bash permanently.
like using the service and chkconfig commands, i have to use /sbin/service instead of just service
/etc/bashrc
That is the configuration file that is mostly common, but it depends on your distribution you have. Do a search on the main site of the distribution you are using and see how they handle the /etc/bashrc file or if they even use a bashrc file. If they don't use bashrc do a search in google for your distro and alias and see if anything comes up about setting a permenant alias and you will see where you can set the environment variables. I say to use alias because I think it might be easier to find what your looking for with those search parameters.
I know suse 9.3 has a /etc/bash.bashrc file that is usually changed when the system is updated so they tell you to use /etc/bash.bashrc.local. That files doesn't exist by default so you have to create it and put what you want in it.
I put the following in my ~/.bash_profile:Quote:
Originally Posted by man bash
Code:export PATH="${PATH}:/sbin:/usr/sbin"