LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-30-2002, 12:10 AM   #1
Chooco
Member
 
Registered: May 2002
Location: Mexico
Distribution: Slackware
Posts: 118

Rep: Reputation: 15
shutdown command ain't workin


i want to restart my puter off without f***in it up ok. in the console as root i type in "shutdown -r now" and it says unknown command 'shutdown'
ok no problems then, i check my Linux book to see what the REAL command it and it says "# shutdown -r now" so i typed that in and there is absolutely no response, i take out the space between the # and shutdown, still no response.

what am i doing wrong???
 
Old 05-30-2002, 01:30 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
well first off, usually by default only root has permissions to that command. are you doing this as root ?
also, are you trying to shutdown the machine, cause a shutdown -r now is actually a reboot.

also you can use:

shutdown -h now
halt
init 0

all of these will shutdown your machine.

shutdown -r now
reboot
init 6
ctrl-alt-delete

all of these will reboot your machine.

if your just a regular user and want them to have permission to shutdown, you can edit those accordingly and add them to the users PATH, or just make an alias to it even...
 
Old 05-30-2002, 01:31 AM   #3
hyperpimp
LQ Newbie
 
Registered: Apr 2002
Location: a very hot place
Distribution: slack 8.0 with no X :( & mandrake 8.2
Posts: 27

Rep: Reputation: 15
when a book shows commands and it starts with # or $ it is referring to the # or $ that comes immediately after your prompt
for example
[user@host /home]$ or [root@host /root]#
in otherwords it can pretty much be disregarded.
although i'm not 100% sure, my guess is that root is the only user that can issue the shutdown command on your machine.
try becoming root using the su command
if you don't have root access to your machine, try using halt -n (although slackware kept me from using this unless i was root)
if that doesn't work try issuing the reboot command, then just shut the computer off before your os starts loading
if you can't issue the reboot command, try ctrl-alt-del.

there's something else you can do too, but i forget and don't feel like looking it up, and at least one of the above solutions should work



edit:
damn tricky, you beat me
 
Old 05-30-2002, 01:35 AM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
Quote:
Originally posted by hyperpimp
edit:
damn tricky, you beat me
I tend to do that at times, I'm sorry, I can't help it, I am addicted. Anyways, just realized that he said he typed after the #. That means he is doing this as root, if he's using bash I presume. Hmmmm...
 
Old 05-30-2002, 01:42 AM   #5
hyperpimp
LQ Newbie
 
Registered: Apr 2002
Location: a very hot place
Distribution: slack 8.0 with no X :( & mandrake 8.2
Posts: 27

Rep: Reputation: 15
no he said his book shows the # , so he though it was part of the command
 
Old 05-30-2002, 02:01 AM   #6
sakeeb
Member
 
Registered: Apr 2002
Posts: 270

Rep: Reputation: 31
alt-ctr-del is for shutdown for some distributions(deb).
the poweroff command will shut down ur system .
i thing init command needs roots previlage.

however u can configure you alt-ctr-del key in /etc/inittab
 
Old 05-30-2002, 07:33 AM   #7
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
Usually redhat doesn't include /sbin into root $PATH variable, so try typing the obsolute path to the command
/sbin/shutdown -r now
must work.
 
Old 05-30-2002, 08:49 AM   #8
jglen490
Member
 
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 8.04
Posts: 668

Rep: Reputation: 31
Quote:
also you can use:
shutdown -h now
halt
init 0

all of these will shutdown your machine.

shutdown -r now
reboot
init 6
ctrl-alt-delete

all of these will reboot your machine.
You are absolutely correct, but not necessarily right. The shutdown command, with parameters, will properly shutdown/reboot your Linux -- safely. "Halt" or "init 0" will shutdown your machine, but not with reasonable assurance of safety of your data. The same with "reboot" and "init 6". Those shorcuts should only be used if nothing else will work -- and not just for convenience. As for "ctrl/alt/delete", the actual actions performed are controllable by an entry in your /etc/inittab file and can either halt or reboot your Linux installation.
 
Old 05-30-2002, 09:07 AM   #9
Chooco
Member
 
Registered: May 2002
Location: Mexico
Distribution: Slackware
Posts: 118

Original Poster
Rep: Reputation: 15
some of those don't work on my machine, i haven't been on that machine since last night because it takes like 15 minutes to boot (i can't set mandrake to boot in console and it's on a celeron 500 omg)

i actually remember the sequence of commands i did

shutdown -r now
unknown command 'shutdown'
#shutdown -r now
(no error message, just doesn't do anything)
shutdown -h now
uknown command 'shutdown'
#shutdown -h now
(no message, does nothing)


ok so now i know the # should not be included....... i'm having a bitch of a time with Mandrake here. Mandrake is actually refusing to connect to the internet. instead of reposting, i will just give ya the link to the anandtech thread
http://forums.anandtech.com/messagev...hreadid=797574
 
Old 05-30-2002, 09:13 AM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
well obivously you need to specify the path of /sbin/shutdown, doesn't matter what parameters you bother giving to the program, it's quite obivous from the errors you get that it just plain can't find it... (and you know that # comments it out, so is utterly wrong here). I assume you are greatly exagerating the 15 minute boot up. if you're not then somethign is blatantly very wrong.
 
Old 05-30-2002, 10:58 AM   #11
Noerr
Member
 
Registered: May 2002
Location: Dalec, HU
Distribution: Redhat 7.3
Posts: 696

Rep: Reputation: 30
btw sakeeb
ctrl+alt+del will restart computer not shutdown
and yes
/sbin/shutdown -r now
or
/sbin/halt

it's really funny that #, but I remember used to have similar dilemas.
 
Old 05-30-2002, 11:20 AM   #12
Rashkae
Member
 
Registered: May 2002
Distribution: Slackware
Posts: 125

Rep: Reputation: 15
15 minutes to boot is right. If he can't shutdown, he probably has to run a full fsck every book (ouch).
 
Old 05-30-2002, 04:22 PM   #13
Chooco
Member
 
Registered: May 2002
Location: Mexico
Distribution: Slackware
Posts: 118

Original Poster
Rep: Reputation: 15
Quote:
I assume you are greatly exagerating the 15 minute boot up.
surprisingly, no. it really does take that long to boot.
Quote:
if you're not then somethign is blatantly very wrong.
yeah, i just just said it was a celeron, you gotta start listenin lol. well it's bit more than just a celeron problem, it has a VERY slow motherboard and it's PC100 RAM. there's no surprise why it's so friggin slow.

with the boot up, it stays on the emachines logo for about 3 minutes. then it starts to load KDE, it gets stuck on network io or something like that for about 10 minutes then continues to load for about 2 minutes.
 
Old 05-30-2002, 04:26 PM   #14
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
no, even my p120 boots in 2 minutes. i guess it's that fsck...
 
Old 05-30-2002, 05:21 PM   #15
Chooco
Member
 
Registered: May 2002
Location: Mexico
Distribution: Slackware
Posts: 118

Original Poster
Rep: Reputation: 15
yeah right, there is no way a P1 can load that 350mb program KDE in 2 minutes. my buddy's Athlon 1200 takes about 1 and a half minutes.
 
  


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
Shutdown command? MikeZila Linux - Newbie 7 07-27-2008 06:09 PM
shutdown command xviddivxoggmp3 Red Hat 5 05-12-2004 05:48 PM
shutdown command Oakstaff Linux - Newbie 8 11-18-2003 10:47 PM
shutdown command nelly_boy Linux - Software 11 08-03-2003 07:04 AM
Shutdown Command? AMDPwred Linux - General 1 01-25-2002 09:43 PM

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

All times are GMT -5. The time now is 04:06 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