LinuxQuestions.org
Review your favorite Linux distribution.
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 01-25-2010, 07:29 PM   #1
casualzone
Member
 
Registered: Jan 2010
Posts: 189

Rep: Reputation: 15
/sbin/lspci vs lspci


I just wonder why some users can omit to type /sbin/

For example /sbin/lspci command.

I have to type /sbin/lspci to execute the command lspci but I frequent saw in the threats, they normally execute lspci command instead of /sbin/lspci

Any trick to do it?

other commands like fsck, iwconfig, ifconfig etc
 
Old 01-25-2010, 07:32 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Some of these commands have capabilities that only root user can use, and/or are used for system maintenance, which must be done by root. Such system tools are often in /sbin.

As a regular user, /sbin is not normally in your $PATH environment variable, so this means you need to give the full path to the executable when using it.

When you are root however, /sbin is in the $PATH, so the shell can find the executable without needing to have a full path to it.

Sasha
 
Old 01-25-2010, 07:40 PM   #3
casualzone
Member
 
Registered: Jan 2010
Posts: 189

Original Poster
Rep: Reputation: 15
Thank you for your swift response
 
  


Reply


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
I can't find my /sbin/lspci file for uploading info for HCL k0lvert Linux - Newbie 4 11-10-2007 09:41 AM
trying to copy the output of /sbin/lspci to another window interndan Slackware 9 11-18-2005 04:24 AM
/sbin/lspci paste cas1123 Linux - Hardware 2 08-06-2005 04:54 PM
3com network card not listed by /sbin/lspci lixy Linux - Hardware 7 02-12-2005 01:11 PM
lspci.. lspci -H.. difference on different meachines? rohan208 Linux - Wireless Networking 0 06-28-2004 11:19 AM

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

All times are GMT -5. The time now is 09:07 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration