Keep linux system awake and running

Forum rules
Before you post please read how to get help
Post Reply
rouhi
Level 1
Level 1
Posts: 1
Joined: Thu May 31, 2018 4:00 am

Keep linux system awake and running

Post by rouhi » Thu May 31, 2018 4:22 am

Hi,

I have a linuxmint 17.2 installed on my HP PC.

I have edited

Code: Select all

/etc/default/grub
and replaced

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash”
with

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT=“text”
so that the linux starts in

Code: Select all

tty
.
I am going to use the PC as an SSH server that I will connect to it using my laptop to run some commands and get results. Therefore I have disconnected the monitor and only connected the LAN cable to the PC.

Things work very well after the computer boots. I can connect to the computer through SSH properly. But after about 10 minutes the computer goes to sleep, standby or .... . That I cannot connect to it anymore through SSH.

I want to see how can I force the system to keep alive 24/7?

acerimusdux
Level 4
Level 4
Posts: 338
Joined: Sat Dec 26, 2009 3:36 pm

Re: Keep linux system awake and running

Post by acerimusdux » Thu May 31, 2018 6:50 am

Well if you are running a default installation, it probaly is still running the whole X windows system, display manager, window system, etc., and is configured by default to sleep after a certain time to protect the screen (which is no longer attached).

Next time you log in, try this:
sudo service lightdm stop

And if you want to regularly run headless, set it so lightdm doesn't start in the first place:
sudo systemctl disable lightdm.service

acerimusdux
Level 4
Level 4
Posts: 338
Joined: Sat Dec 26, 2009 3:36 pm

Re: Keep linux system awake and running

Post by acerimusdux » Thu May 31, 2018 7:02 am

Also usefull, the wakeonlan program, if you want to be able to wake your computer over the lan when it is asleep:

https://community.linuxmint.com/tutorial/view/1062

Post Reply

Return to “Others”