Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want my server system to be kept on for always. I don't want it to shut down automatically. What is the setting commands for it? My server version is 10.04.4

share|improve this question
Ubuntu doesn't shut down automatically by default, meaning you've done something to make it shut down... That makes the next step rather circular. Any idea what you did? – Oli Oct 11 '13 at 12:00
i did nothing. As it's a server, so i just want it to be on for always so i can even have remote access.. means i may be working after gap of 5-10 hours. – user200775 Oct 11 '13 at 12:05
What I'm saying is it should be on. If it's turning off, something has been done to it in order to turn it off after a period of time. – Oli Oct 11 '13 at 12:07
my server is on right now.. i am leaving from the place where server is placed. i just want that it doesn't shut down itself automatically because of no activity for hours.. i may be remote assessing it after 10 hours.. – user200775 Oct 11 '13 at 12:08
This is very strange. I don't know any server installation that does this. – MadMike Oct 11 '13 at 12:13

There are several reasons for a computer to shutdown, and I can quickly identify 4:

  1. There is a process (or cron job) shutting it down;
  2. Power outage, abnormal shutdown;
  3. Power outage, gracefull shutdown by your UPS;
  4. Hardware failure.

You can see the reason for the shutdown with this command:

sudo last -x

This command is used to list all system loggins, but it also displays the shutdown, reboot and boot times.

When you shutdown your computer, the run level changes to zero, so you should see this line:

runlevel (to lvl 0)

If you don't see it, then it's an abnormal shutdown (power outage), and that means you should install an UPS.

share|improve this answer

It's a hardware or software problem. If your server is too hot or defective it may do an emergency shutdown after a while to prevent damage.
Use from a console less /var/log/syslog and dmesg (the last in pipe with grep) to find the reason for the shutdown.
If it's NOT an hardware problem (eg. no kernel warnings) then watch in those places (with ls for dirs and nano to edit files) to find shutdown commands & remove them (interpret * as a wildcard please):

  • /etc/init/
  • /etc/init.d/
  • /etc/rc.local
  • /etc/rc*.d

(if you find "bad" commands here your system might have been violated, it's not a standard behaviour).
If you use cron (installed by default), see here:

  • /etc/cron.*
  • /etc/crontab

The cron's places may vary depending on your configuration.
(if you find bad stuff here, watch for bad packages or intrusions)
Important note: you should not edit cron's files manually, but use a specific software if you can.
If you feel that your system has been haltered or violated reinstall it (do a backup first) OR try to use an Open Source antivirus solution (some malware/virus/backdoor/rootkit can infect Linux!).
If you still can't solve (bad situation) and don't want to reinstall, use sudo update-rc.d ENTRY disable to disable the non exential software, but first try to boot in single use mode to see if it's an internal problem.
It's all I can suggest for now, I've done my best.
Try to solve & have a good experience.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.