1

I 'm in Ubuntu 12.04 but I'm using it with crouton in a Chromebook, the terminal emulator it uses is UXTerm but it seems that it doesn't have any editor installed - gedit, nano and pico are all absent.

Because I messed up the sources.list I can't install any text editor through apt-get and therefore I can't fix the sources.list.

Tim
  • 33,500
4NBark
  • 13
  • 2

2 Answers2

1

Try using vi:

vi
vim - Vi IMproved, a programmers text editor
Tim
  • 33,500
1

In case you can't find an editor, but can run sudo and sh (or bash), then use (replacing trusty with precise for 12.04, and us with an appropriate country code):

sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak
sudo sh -c 'printf "deb http://us.archive.ubuntu.com/ubuntu trusty%s main multiverse restricted universe\n" "" -security -updates > /etc/apt/sources.list' 

This uses only shell utilities (except for mv, and that isn't necessary), so it should be enough to rebuild your sources at least.

muru
  • 207,228