Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to run a bash script at startup in Fedora 22

I am running Fedora 22 in dual boot with Windows 7. I wrote a script to mount the Windows partition at /win/ and link the Documents folder from Windows in my home folder. This is the script:


sudo mount /dev/sda2 /win/
ln -s /win/Users/name/Documents / /home/name/Documents

I have put the script in /etc/init.d/ and run chmod a+x but it does not run when I reboot. The script runs fine when I start it manually. Am I doing something wrong?