Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want to edit .bash_profile on my Ubuntu system. When I try to run the command, 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.

share|improve this question
    
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
add comment

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

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

2 Answers

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.