Posted on 2014-09-02
Last Modified: 2014-09-02
I am running Red Hat 6.x

I get the foolowing results from the following command:

[root@mmclnt1 bin]# cd /bin/bash
-bash: cd: /bin/bash: Not a directory

How do I install bash on my machine ?
Question by:Anthony Lucia
    LVL 34

    Accepted Solution

    bash should already be there and the default shell
    if you type ps it should show bash as running
    cd is for changing directories; bash is a file not a directory
    LVL 12

    Assisted Solution

    It should be installed.  /bin/bash is a binary, not a directory.
    You can
    cd /bin
    ls -l bash

    You can tell which shell you are using via -
    ps -p $$

    You should get something like
      PID TTY          TIME CMD
    19301 pts/3    00:00:00 bash
    LVL 14

    Expert Comment

    Are you sure it's not already installed? The command that you used will always return "Not a directory", even when bash is installed. That's because /bin/bash is an executable file, not a directory.

    To run a script using bash, use this syntax:

    Open in new window

    Do you get an error when you try that?

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
    I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now