?
Solved

/bin/bash

Posted on 2014-09-02
3
Medium Priority
?
293 Views
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 ?
0
Comment
Question by:Anthony Lucia
3 Comments
 
LVL 36

Accepted Solution

by:
Seth Simmons earned 1000 total points
ID: 40298843
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
0
 
LVL 12

Assisted Solution

by:Kent W
Kent W earned 1000 total points
ID: 40298853
It should be installed.  /bin/bash is a binary, not a directory.
You can
cd /bin
then
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
0
 
LVL 14

Expert Comment

by:ThomasMcA2
ID: 40298854
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:
bash your_script.sh

Open in new window

Do you get an error when you try that?
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month14 days, 20 hours left to enroll

839 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