How do i run a file automatically when my linux starts?

Put the command you want to run on this file

/etc/rc.local