(Linux Newb) How do i execute shell scripts on linux?

Discussion in 'Linux & BSD' started by XeoNoX, Jan 7, 2003.

  1. XeoNoX

    XeoNoX OSNN Senior Addict

    How do i run a ".sh" file on linux? How can i compile a ".c" file on linux.

    If there are command lines and GUI methods of doing this please tell me both, as i am trying to learn linux.
  2. Zedric

    Zedric NTFS Guru Folding Team

    The C code can be compiled with gcc.

    The shell scripts (who won't need a .sh extension because Linux doesn't care about extensions) must have two things:
    - First row must be: #!/usr/bin/sh or whatever the path to sh is (or whatever shell you plan to use).
    - You must have permission to execute the file. For instance do chmod 755 script-file to set the permissions.