I want to edit .bash_profile on my Ubuntu system. When I try to run the command open .bash_profile, it gives this message:

Couldn't get a file descriptor referring to the console

Please help me get around this problem and edit the file.

migrated from stackoverflow.com May 24 '11 at 10:07

This question came from our site for professional and enthusiast programmers.

  • You should be able to just do something like vim ~/.bash_profile. If you can't, then you have probably borked the file's permissions or something. – Anonymous May 24 '11 at 9:50

open(1) is a symlink to openvt(1), for which the description is "start a program on a new virtual terminal". To do this, it needs access to the console device to open the virtual terminal. This is not likely the program you are looking for.

Debian systems have a generic edit command that you can use to edit a file. Otherwise, choose a specific editor you want to use and invoke that with .bash_profile.


You can do that in a very simple way: go to your home folder and go to view in the menu bar, check the show hidden files option and now you will be able to see the folders and files starting with a dot (.). Now find yourself a .bash_profile. If found , do your thing, and if not, well create one and then do your thing. I created me one but it was .bash_aliases (to store an alias for zend framework command line operation). It's simple.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy