Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Problem on my Ubuntu machine. When I try to open some file in an editor like nano, vi or sudo gedit, nothing shows up, but nano ~/.bashrc works fine without any problem.

I have two user accounts on my Ubuntu system, and it's the same problem with the other user account.

share|improve this question
Why you tagged this question as it would be about Ubuntu One? – espectalll Jun 3 '12 at 9:50
Which system version are you using? Why sudo gedit? – espectalll Jun 3 '12 at 9:50
I dont know exactly where to ask my question :( – iav-babak Jun 3 '12 at 9:51
Ubuntu One is a Dropbox-like service... Tag it with the Ubuntu version you're using! – espectalll Jun 3 '12 at 9:53
Can you say me which files are you trying to edit? – espectalll Jun 3 '12 at 9:56
up vote 2 down vote accepted

You're trying to open the files with commands like this:

nano etc/apt/sources.list
nano conf/

In the first, you forget to add the root folder! Just add a slash before the rest of the file path:

nano /etc/apt/sources.list

In the second, you need to add the Hadoop path:

nano $HADOOP_HOME/conf/

Also, you'll probably need to open them as root user, so add sudo before all the command (just like with gedit!):

sudo nano /etc/apt/sources.list
sudo nano $HADOOP_HOME/conf/
share|improve this answer
I did it but no changes :( – iav-babak Jun 3 '12 at 10:11
Modified! Now you should be able to do what you want! – espectalll Jun 3 '12 at 10:15
Wow...good catch @espectalll123. I made the assumption that he was coming from a relative path and knew what he was opening. (I just typed the /etc out of habit more than anything.) – JasCav Jun 3 '12 at 10:25

The reason you are having an issue manipulating files is that you must have the appropriate level permissions in order to manipulate those files.

So, for example, if you want to manipulate /etc/apt/sources.list, that requires that you use sudo to temporarily elevate your permissions so you can edit the file. On your current user account, try:

sudo nano /etc/apt/sources.list

If you are already part of the sudo group, then you will be asked for your password. Once you type in your password, your privileges will be temporarily escalated so you can edit the file and save it.

If you are not part of the sudo group, another user on the system who has sudo access can add you by doing:

sudo usermod -a -G sudo your-user-name

Learn more about Linux permissions here:

share|improve this answer
thank you for your answer. for this command sudo nano /etc/apt/sources.list works fine but for this one sudo nano conf/ the problem remain – iav-babak Jun 3 '12 at 10:09
For the second command, read what I answered! – espectalll Jun 3 '12 at 10:12
I did it but no changes in result :( – iav-babak Jun 3 '12 at 10:14

vi function in Ubuntu is different, you can install vim-nox or vim package So after that you can try it for the same file

use following command

sudo apt-get install vim-nox 


 sudo apt-get install vim
share|improve this answer
That's not what's he asking... I think. – espectalll Jun 3 '12 at 9:56
thank you for your answer but I thin my problem is from another thing. if i run nano etc/apt/sources.list it works fine. The folder the the file are in them have a lock – iav-babak Jun 3 '12 at 9:58

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.