Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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 guess my question is closer to "How would I go about editing a .conf file from a remote connection via an ssh terminal?"

I downloaded an ssh emulator to my iPhone which works fine and dandy, and I can ssh to my computer at home via DNS services. Right now I'm trying to annoy my room mates who are home right now my getting my machine to beep. In order to do that I need to edit /etc/modprobe.d/blacklist.config. I tried sudoedit but I got no text. Anything graphical is out of the question, because I'm essentially in a dedicated terminal like if you pressed Ctrl+alt+F1.

share|improve this question
sudo -e /path/to/config_file, you can set your editor to nano if you prefer. – bodhi.zazen Mar 24 '14 at 17:14
Thanks for both of your help! The comment by bodhi.zazen helped most. – skeeter_mcbee Mar 24 '14 at 17:21
@EliahKagan - Alrighty then ;) – bodhi.zazen Mar 25 '14 at 16:47
up vote 1 down vote accepted

On the command line (over ssh or without X) to edit a config file I suggest:

sudo -e /path/to/config_file

By default sudo (root) uses vi as an editor. Personally I prefer vim

sudo apt-get install vim-full

To change your editor, run

sudo update-alternatives --config editor

You will see something like this:

There are 3 choices for the alternative editor (providing /usr/bin/editor).

  Selection    Path                Priority   Status
* 0            /bin/nano            40        auto mode
  1            /bin/nano            40        manual mode
  2            /usr/bin/vim.basic   30        manual mode
  3            /usr/bin/vim.tiny    10        manual mode

hit the number key to change your preferred

share|improve this answer

Try nano or pico since they are usually on most systems along with vi. Vi would probably be annoying to use on a phone, so I'd go with the former possibilities.

share|improve this answer
+1 Vi/Vim is very horrible on a phone. Where's the ESC key? Also, vim has a steeper learning curve than nano/pico for those unfamiliar with terminal editors. – Sparhawk Mar 26 '14 at 11:37

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.