Linux - NewbieThis 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
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.
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.
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...
Distribution: slack 8.0 with no X :( & mandrake 8.2
Posts: 27
Rep:
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
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...
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.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.