1

can you please tell me how can I execute the following command automatically on startup, instead of having to type it manually each time:

sudo thinkfan -n
muru
  • 193,181
  • 53
  • 473
  • 722
munificent
  • 13
  • 3

2 Answers2

0

As described on zmalltalker.com you have to create a systemd service.

Create a file e.g. /usr/lib/systemd/system/thinkfan.service with the following content:

[Unit]
Description=simple and lightweight fan control program

[Service]
ExecStart=/usr/sbin/thinkfan -q -n

[Install]
WantedBy=multi-user.target

and enable and start the service with

sudo systemctl enable thinkfan.service
sudo systemctl start thinkfan.service
cgtobi
  • 1
  • 4
0

Just enable the rc.local file by typing

sudo systemctl enable rc-local.service

After that add every command you want to the following file

nano /etc/rc.local
itssme
  • 194
  • 1
  • 2
  • 12