Keep linux system awake and running

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
rouhi

Keep linux system awake and running

Post by rouhi »

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?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
acerimusdux
Level 5
Level 5
Posts: 635
Joined: Sat Dec 26, 2009 3:36 pm

Re: Keep linux system awake and running

Post by acerimusdux »

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 5
Level 5
Posts: 635
Joined: Sat Dec 26, 2009 3:36 pm

Re: Keep linux system awake and running

Post by acerimusdux »

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
Locked

Return to “Software & Applications”