PDA

View Full Version : [ubuntu] Editing Files using SSH


unsoc
August 31st, 2008, 02:46 PM
I have installed the vi test editor and when I try to edit files using SSH the only thing I see in the files at the beginning of each line is ~

Is there a way to correct this or a better text editor for SSH?

Thank You

tubezninja
August 31st, 2008, 04:58 PM
Yeah, that's vi. People who've learned it swear by it. Others can barely comprehend it. :)

You may want to start out with nano as your text editor and work your way up to vi.

sudo apt-get install nano

Nano is about as simple as it gets.

EDIT: There's also emacs, which is somewhat more complex.

Oldsoldier2003
August 31st, 2008, 05:28 PM
Yeah, that's vi. People who've learned it swear by it. Others can barely comprehend it. :)

You may want to start out with nano as your text editor and work your way up to vi.

sudo apt-get install nano

Nano is about as simple as it gets.

EDIT: There's also emacs, which is somewhat more complex.

+1 for simple file editing I always suggest nano. More experienced users may prefer emacs or vi/vim, but its hard to go wrong with nano.

inphektion
August 31st, 2008, 06:48 PM
vi is simple if you know the commands... which is as easy as a google search. Start out with the basics and anytime you want to do something like search and replace or edit 5 lines in a row with the same repeating pattern than google that and soon you'll pick up on more advanced commands.

unsoc
September 1st, 2008, 08:08 PM
I haven't messed with commands in a few years. I have been using Xampp for all my home server needs and decided I wanted to expand my knowledge with servers. Being a Kubuntu user I figured what better server to try than Ubuntu Server.

Anyhow, I got nano installed and everything is working out well so far. Apache is up and running, Mysql is running and SSH. I've changed all the ports to make it a bit more secure. Now time to start reading some more.


Thanks for the help guys!

igb
September 2nd, 2008, 04:21 AM
I love Emacs, but it does have a steep learning curve. However, it does have one very useful mode called "tramp mode". This allows you to run your local copy of emacs, with all its customizations and edit files remote via ssh.

You can also run emacs remotely via an ssh terminal if you wish.

Ian.