View Single Post
danramos's Avatar
Posts: 4,672 | Thanked: 5,455 times | Joined on Jul 2008 @ Springfield, MA, USA
#8814
Originally Posted by slai View Post
did ls -al and it shows root across the board.

Trying the "vi" thing :P .

This happens after i hit enter "vi /etc/apt/sources.list.d/mymoves.list":



And nothing happens if i try to write stuff. If i press "d" though it says "Delete 1 lines (1 chars) using [D]".
To start inserting, you can press "i"... when you're done typing, you can press ESC to go back to command mode, where you can type commands starting with a colon (":")... i.e. to save and quit...
:wq

(the colon means you're giving a command, w means "write the file" and "q" means quit)

This assumes you gave the filename at the command line, if you only launched vi without a filename (i.e.: only just typed "vi" ) you can insert text and finally write out the file with a filename like this:

:w /etc/apt/sources.list.d/mymoves.list

and then later quit with:

:q

If you've made a horrible, horrible mistake and you want to quit without writing the file without the changes you've made since loading, you can quit with a panic, like so:

:q!

This will tell vi to just quit without writing anything.

I hope this helped.
__________________
Nokia's slogan shouldn't be the pedo-palmgrabbing image with the slogan, "Connecting People"... It should be one hand open pleadingly with another hand giving the middle finger and the more apt slogan, "Potential Unrealized." --DR
 

The Following 4 Users Say Thank You to danramos For This Useful Post: