LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-16-2007, 02:08 AM   #1
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Rep: Reputation: 30
Question viewing all the commands


i was using redhat previously and while using shutdown command works fine .

now i am using fedora but it displays

[root@localhost user]# shutdown
bash: shutdown: command not found


so is there any way to view all the commands that is supported by the shell.

Thanks
 
Old 10-16-2007, 02:18 AM   #2
selva146
Member
 
Registered: Oct 2007
Location: INDIA
Distribution: Rehat, Fedora, RHEL
Posts: 47

Rep: Reputation: 15
Press tab key to see all the available command for you shell
 
Old 10-16-2007, 02:26 AM   #3
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
Thankyou that works fine

is there any way to redirect its output to a file.
 
Old 10-16-2007, 02:27 AM   #4
The_JinJ
Member
 
Registered: Apr 2004
Location: Scotland
Distribution: Suse, OpenWRT
Posts: 299

Rep: Reputation: 30
shutdown will be root only - confirm by using the absolute path /sbin/shutdown (guess it's there in Fedora!)

use sudo if you want users to be able to shutdown or maybe su - -c shutdown -h now
 
Old 10-16-2007, 02:31 AM   #5
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
thanks jin

shutdown is available in /sbin/ but i cant see it in console while pressing tab to view all commands
 
Old 10-16-2007, 02:40 AM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 164Reputation: 164
Using the shell's tab completion will display all of the commands available by searching your path (type echo $PATH). If the /sbin directory is not on your path, then the commands in that directory won't be listed. I haven't used Fedora for a while, but it may be that the path for root is set in /etc/profile as it is in Slackware. Have a look in there and add /sbin if necessary.
 
Old 10-16-2007, 02:50 AM   #7
selva146
Member
 
Registered: Oct 2007
Location: INDIA
Distribution: Rehat, Fedora, RHEL
Posts: 47

Rep: Reputation: 15
AS gilead said, the /sbin won't be in PATH variable by defalut. this /sbin will be available only to the root user.

so if you want to give access to the commands under /sbin to the normal user, add /sbin in PATH variable in .bashrc of the home directory of the user
 
Old 10-16-2007, 02:53 AM   #8
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 164Reputation: 164
Judging by the first post, it was the root account being used. I thought that was unusual - root has /sbin in the path on all of my boxes.
 
  


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
Suse Linux Commands For These Aix Commands? Vaskar Guha Linux - Software 2 12-19-2005 12:45 AM
viewing ur ip thriller Linux - Networking 2 07-04-2004 07:14 PM
Sending commands and viewing replies from a serial-attached appliance bgianardo Programming 3 01-19-2004 11:00 AM
I need help with mounting and viewing hd B.A. Babrukis Red Hat 5 10-21-2003 05:19 AM
TV Viewing Stephanie Linux - General 1 10-09-2001 01:09 AM


All times are GMT -5. The time now is 03:06 AM.

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