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.

  • 1
    sudo -e /path/to/config_file, you can set your editor to nano if you prefer. – Panther 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 ;) – Panther Mar 25 '14 at 16:47

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


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.

  • +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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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