Click to See Complete Forum and Search --> : The shutdown command
Red Lotus
08-19-2001, 09:45 PM
I can't seem to use the shutdown command while in the X Windows System. It reports that the command is not found (tested in the bash). Is this normal for shutdown not to function in X? I tried shutdown when I wasn't in X and it worked.
The command I'm using is:
shutdown -r now
Oh and, is there a way to quit the X Windows System at the shell prompt while in X? I know startx will start up X while in text mode.
Concrete Geist
08-19-2001, 09:50 PM
Try using halt
Red Lotus
08-19-2001, 10:56 PM
I tried halt as well, and it didn't work. Sorry :(.
inktoast
08-19-2001, 11:05 PM
are you trying it as root? if not type su then enter the root password they try and shutting down. Oh, BTW shutdown -r now will just restart you need shutdown -h now to shut your computer down. Hope that helps
Linuxcool
08-19-2001, 11:13 PM
Use ' su - ' to become root and then run shutdown. ' su ' by itself won't give you root's environment and you need root's path for it to find the shutdown command.
Red Lotus
08-19-2001, 11:39 PM
Thanks for the help :). It worked. But I do remember when I was configuring linuxconf that I gave my user account permission to shutdown the system. :confused: And I never thought that I would have to be in root's login directory to use the command.
And is there a way to go into text mode (terminate the X session) while in the X Window System?
Linuxcool
08-19-2001, 11:51 PM
The reason you need root's environment is that shutdown is located in the /sbin directory. I don't believe users have that in their path. You could add the path to users' path. That's probably what you did with linuxconf. Then you'd have to change permissions on the /sbin directory and the shutdown commmand to allow users to access shutdown.
As for getting text screen, you could use CTRL-ALT-F1...F6 to get a console screen. Of course, X window would still be running. Doesn't logging out of X window terminate it?