0

I need some help with running commands on system startup.

So, I need these two commands to be executed every time I start my machine, due a problem with my Realtek driver (doesn't really matter):

sudo ifconfig myCode up
sudo service network-manager restart

How do I manage that to work?

I'm getting confused with sudo command and not knowing when will I enter my password or will the script even be run. Sorry for my low knowledge of Ubuntu system.

Thank you for your time!

sebamed
  • 101
  • 1
    Since your commands are sudo, you should have a look at http://askubuntu.com/questions/46953/how-can-i-add-commands-to-startup-requiring-admin-privileges?rq=1 – m.raynal Feb 05 '17 at 19:55

1 Answers1

-1

Add ifconfig myCode up & service network-manager restart at the end of the /etc/rc.local before "exit 0"

wlraider70
  • 1,683
  • I did, but it doesnt seem to do the right job. It only took fer minutes to change between login screen and actual desktop – sebamed Feb 05 '17 at 20:24
  • sound like an issue with your commands, you might want to open a new question for that. – wlraider70 Feb 05 '17 at 20:43