Linux - DistributionsThis forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on...
Note: An (*) indicates there is no official participation from that distribution here at LQ.
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.
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.
Hi,
I am using centOS which is identical to RH Enterprise linux but when type
lsdev or lsscsi, the system tells me that command not found. Why don't i have these utilities?
Moreover, when i login as normal user and even su (just "su", not "su -"), i cant invoke lspci, lsmod... However, when i use "su -", i can invoke those comamnd. As far as i know, when a user type a command, the system look for the command in the PATH associated with the user profile so the PATH must be the same as long as i am root ("su" or "su -"). The different between su and su - is just the directory i am in, so why can't i invoke lspci and some other command when i am in a non-root directory?
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790
Rep:
Quote:
Originally Posted by lnthai2002
Hi,
I am using centOS which is identical to RH Enterprise linux but when type
lsdev or lsscsi, the system tells me that command not found. Why don't i have these utilities?
Because they are not part of the Red Hat Enterprise Linux release.
Quote:
Originally Posted by lnthai2002
Moreover, when i login as normal user and even su (just "su", not "su -"), i cant invoke lspci, lsmod... However, when i use "su -", i can invoke those comamnd. As far as i know, when a user type a command, the system look for the command in the PATH associated with the user profile so the PATH must be the same as long as i am root ("su" or "su -"). The different between su and su - is just the directory i am in, so why can't i invoke lspci and some other command when i am in a non-root directory?
When you use 'su' you inherit the users pathing, using 'su -' provides root's pathing. This does not matter which directory you are in. As an experiment use $PATH, look at your user path by typing this. Next use 'su' and try $PATH again exit the do the same after using 'su -', see the diiference.
And you can modify your user pathing to add /sbin and other wanted directories to your user pathing (look at the user's .bash_profile file). Or simply do something like for example;
Thanks for the instruction. You said that lsdev is not part of RH Enterprise, so where i can get these utilities? What package i should install to have lsdev and lsscsi?
Thanks
THAI
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790
Rep:
I'm not 100% sure for either utility, but google should be helpful. You do not need either one, try using as replacements (maybe make alias's for them)
Hi, you do have lsscsi in Linux Centos 5.X. You just need to install the package.
yum install lsscsi
and there you are !
Quote:
Originally Posted by lnthai2002
Hi,
I am using centOS which is identical to RH Enterprise linux but when type
lsdev or lsscsi, the system tells me that command not found. Why don't i have these utilities?
Moreover, when i login as normal user and even su (just "su", not "su -"), i cant invoke lspci, lsmod... However, when i use "su -", i can invoke those comamnd. As far as i know, when a user type a command, the system look for the command in the PATH associated with the user profile so the PATH must be the same as long as i am root ("su" or "su -"). The different between su and su - is just the directory i am in, so why can't i invoke lspci and some other command when i am in a non-root directory?
try "yum install procinfo"
this provides the lsdev utility.
My employer hobbles yum by hacking out many repository names. So, could you supply the repository info and instructions on how to add it to the repositories list?
A good tool for finding packages is http://pkgs.org/
This shows lsscsi in CentOS, but procinfo is only in CentOS 5 and Fedora. You can follow their links to a download page, get the rpm, and install locally.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.