Article 6JHB6 Execute a command when the Linux starts

Execute a command when the Linux starts

by
Jason.nix
from LinuxQuestions.org on (#6JHB6)
Hello,
I'm using Debian and want the command tor -f /etc/tor/torrc2 to run automatically when the system reboots. I tried the following two solutions:
  1. I created a file called Tor.sh in the /etc/init.d/ directory and put the desired command in it, and then using the chmod +x command, I turned it into executable mode.
  2. I put the command in the /etc/rc.local file.
Neither solution worked. What is wrong?

Thank you.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments