How to use BASH?

Discussion in 'Linux' started by jjj, Mar 1, 2009.

  1. jjj

    jjj

    Joined:
    Nov 2, 2008
    Messages:
    96
    Likes Received:
    0
    I see some articles referring to BASH & they tend to assume everyone knows how to run it.

    How do I use this?

    What's the difference between BASH & TERMINAL?
     
    jjj, Mar 1, 2009
    #1
  2. jjj

    Andysan

    Joined:
    Jul 9, 2008
    Messages:
    272
    Likes Received:
    0
    Bash is just another word for terminal, as far as i am aware they are one and the same. This article will explain the bash/terminal:

    http://linux.org.mt/article/terminal

    Any questions, just whistle. You do know how to whistle, don't you? ;)
     
    Andysan, Mar 1, 2009
    #2
  3. jjj

    GeekBrat

    Joined:
    Dec 8, 2008
    Messages:
    2
    Likes Received:
    0
    Actually BASH and TERMINAL are not nessecarily synonyms.

    Opening a terminal could give you a Bourne Again SHell, C SHell, TCSH or one of many others. http://en.wikipedia.org/wiki/Unix_shell#Shell_categories.

    Many people will tend to use the terms synonymously but that doesn't make it right. Generally a person's shell is set in /etc/passwd when a new user is created. This article titled "UNIX Shell Differences and How to Change your Shell" is a good resource of information (http://www.faqs.org/faqs/unix-faq/shell/shell-differences/), as is http://en.wikipedia.org/wiki/Comparison_of_command_shells.

    Sorry if I'm preachy.... But I'm an old unix/linux geek.

    -P/KAF
     
    GeekBrat, Mar 1, 2009
    #3
  4. jjj

    tpcug

    Joined:
    Sep 1, 2008
    Messages:
    20
    Likes Received:
    0
    Just to add to the last post

    BASH is a script based programming language, so if interested see

    http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html

    It is not the same as a terminal but you do start a terminal to run a BASH script.

    If you get a file that looks like filename.sh then look at it in a file viewer. It is just a text file and if it starts

    #!/bin/bash
    #
    # filename.sh

    Then its a BASH file. Run it in a terminal
    :~$ sh filename.sh

    edit:
    I have been a bit simplistic. What we call a terminal is really a shell but it does not matter providing you can use it.
    There is another way to run filename.sh - if the file is made executable. In Thunar, right click and look at properties -> permissions.
    If it is set to 'run as a program' you can then run it using dot-slash

    :-$ ./filename.sh

    Sounds like you need a couple of guides to linux in general. Try
    http://www.linuxnewbieguide.org/
    http://rute.2038bug.com/index.html.gz

    best of luck
     
    tpcug, Mar 2, 2009
    #4
  5. jjj

    jjj

    Joined:
    Nov 2, 2008
    Messages:
    96
    Likes Received:
    0

    Thanks. So whenever anyone refers to bash, I just run it in terminal.

    The only whistling I do requires people to be within earshot.
     
    jjj, Mar 2, 2009
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.