Find the answer to your Linux question:
Results 1 to 3 of 3
Hey, I wanted to create a script (maybe its the wrong word, so what i mean is the Linux version of the batch file in windows, where you were writing ...
  1. #1
    Just Joined!
    Join Date
    Jul 2009
    Posts
    4

    Question Linux startup script

    Hey,

    I wanted to create a script (maybe its the wrong word, so what i mean is the Linux version of the batch file in windows, where you were writing cmd commands and then running it and the commands would be all ran) that will include different BASH commands. For example i have modifying the $PATH variable, and running programs.

    I followed this bit of a tutorial that i can't post a link to cause i don't have 15 posts. The bit that 0i followed was this:

    Code:
    now run chmod 755 first.sh to make the text file executable, and run ./first.sh.
    Your screen should then look like this:
    
    $ chmod 755 first.sh
    $ ./first.sh
    Hello World
    $
    What i was wondering is how can i make that script run, on startup.

    I would be really glad if i can get this to work.

    Thanks,
    Alex

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    955
    Put it in /etc/rc.local
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  3. #3
    Just Joined!
    Join Date
    Jul 2009
    Posts
    58
    I think hazel means, write your script and stick it somewhere -- than call it from /etc/init.d/rc.local or /etc/rc.local {whichever your system uses }

    That script runs once, only at startup.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...