Web Hosting Talk







View Full Version : How can I reboot linux server from DOS prompt


jolly
03-06-2001, 04:22 AM
Can anyone tell me how can I reboot linux server from the DOS promt. I am not familiar with DOS OS
If you know any site where can I get the commands or information about the linux server.

gandmasti.com
03-06-2001, 05:41 AM
If you mean from your linux shell -- "shutdown -r now". You need root privs.

Tim Greer
03-06-2001, 05:42 AM
Originally posted by jolly
Can anyone tell me how can I reboot linux server from the DOS promt. I am not familiar with DOS OS
If you know any site where can I get the commands or information about the linux server.

To be honest, your post is a little confusing to me. However, the way you'd reboot a remote Linux system, is to either use an interface, such as a control panel or some type of remote reboot system. But, usually, you will be using a command to reboot it via shell access command line. Dos has nothing to do with this, other than the fact that whatever type of system you're using, it'll need to connect to the remote server via telnet or SSH (unless you have other things enabled) and once you are logged into said server, you switch to the root user. Once you're root or any other user that has access granted to them to run said command, you type in something like "/sbin/shutdown -r now" which will reboot the system right than.

You can specify times though, such as 30 minutes, 5 minutes, etc. So people see the announcement on their terminal screen and gives them time to save their work that might otherwise lose. Also, you can possibly have something like "reboot" which you can just type in and reboot the server. I'd assume though, that you don't know how to even switch to root user, if you're asking about DOS and about how to reboot it. Perhaps I don't understand your question. If not, can you elaborate? Thanks.

jolly
03-06-2001, 06:22 AM
Could you please tell me in detail about reboot because I have never used linux and DOS prompt for server administration. I want to learn all these commands.
Is there any site from where I can download all these tutorials.

Tim Greer
03-06-2001, 07:32 AM
Originally posted by jolly
Could you please tell me in detail about reboot because I have never used linux and DOS prompt for server administration. I want to learn all these commands.
Is there any site from where I can download all these tutorials.

Oh, I thought you wanted to know how to connect and reboot a server while in the DOS Operating system. In Unix it's called a shell prompt, prompt or command line, usually. Run telnet (if you don't know how, go to Start->Run and type in "telnet yourserveraddresshere" and it'll bring up a terminal window and connect to that server address. It'll prompt you for a username and password. Type in your account's username and password, pressing Enter each time you want to send that specific piece of information to the server. You'll log in if you provide the correct username and password when prompted for each of them.

Once you're logged in, you'll see a [stuffhere$] or something similar. Type in "su" and you'll be prompted for the root password. Type it in and press Enter. You should see the $ change to a # on the prompt. To make sure you're root, type in "whoami" (without the double quotes, of course) and it should say you're "root". Also, you can type in "id" and see if it shows you are user/group "0" (zero). once you are root, type in "/sbin/shutdown -r now" and it'll send a reboot signal to the server nd your connection will be lost, of course, unless you log out quickly enough (which you don't need to do) by typing "exit" to exit out of root and 'exit' again to log off your user name.

I don't think you ought to be rebooting a server though, if you don't know how to do these basic tasks, or you might harm something. You need to be careful with certain commands, or you can wipe out your entire drive or leave it in an unusable state. For help, buy some books on Linux (O'Reilly is always a great choice) and other Unix commands or systems. Go visit "http://www.linux.org" redhat.org, kernel.org, and other obvious sites. Maybe even linuxtutorial.com? Maybe that exists? Use your favorite search engine and type in the phrase "Linux tutorial" or +Linux +tutorial. You get the idea. You'll find lots of information. Good luck.