Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git Bash bash: open: command not found

Tags:

git

bash

git-bash

I'm new to Git Bash, just freshly downloaded this for use in my class today, on the first class module it ask me to cd in to different directory and ls the content which works perfectly fine in Git Bash, then it ask me to open a README.md file in a folder with the command:

open README.md

then this error message show up:

bash: open: command not found

I know I cd in to the correct folder, and ls does shows the the README.md file, this is a freshly installed and most updated Git Bash, can't imagine there would be a missing link or altered in this program... what can I do? please help thank you!

I'm using Windows 8 with Git for windows

like image 703
bogenwan Avatar asked Mar 05 '16 07:03

bogenwan


People also ask

How do I fix bash command not found?

Install a package Sometimes when you try to use a command and Bash displays the "Command not found" error, it might be because the program is not installed on your system. Correct this by installing a software package containing the command.

What is Open command in Git bash?

open is a linux specific command for Git BashTo access file with some text editor you can simply write the command as start texteditorname filename.

How do I open Gitbash in terminal?

Open the Start menu by clicking on the Windows icon and typing “Git Bash” into the search bar. The icon for Git Bash and the words “Git Bash Desktop App” will appear. Click on the icon or the words “Git Bash Desktop App” to open Git Bash.

How do I open a bash command?

Use of `cat` command: The `cat` is a very useful command of bash to create or display the file's content. Any file type can be created easily and quickly by opening the file using the `cat` command with the '>' symbol. Run the following `cat` command to open a file named file1. txt for writing.


2 Answers

bash: open: command not found

This error message is trying to tell you that there is no such command called "open". There's nothing wrong with the README.md.

  • OSX - open is a universal opener in OSX
  • Linux - has xdg-open
  • Windows - use start

But you don't need to take the instructions literally. It's not really important how you open the readme file. You can open it with the less command to view the content inside the terminal, or you can open it with notepad for editing in a text editor.

like image 51
janos Avatar answered Oct 14 '22 19:10

janos


I had the same problem at first when I started using Git Bash in my Windows computer. I wanted to open a folder on my Desktop. I specified the current directory, which was cd Desktop/test and then I gave the command open . to open the 'test' file, and I received bash: open: command not found. I searched through the internet to find a way to open the file, and then finally I tried this one and it worked.

Solution :

  1. Specify the root directory of the file -> cd Desktop
  2. use "start" keyword and give the file name that you want to open -> start test
like image 42
Anu Avatar answered Oct 14 '22 19:10

Anu