SSH help

Hello everyone!

I am setting up a script on my VPS and I have hit a roadblock.

I am in SSH and I need to edit a file on the server. I have the file open and can see the line that I need to uncomment and edit; however, I can not seem to figure out how to do so. Clicking it simply highlights it and clicking delete doesnt seem to work.

Would any one be so kind as to tell me how to uncomment/edit the line and then save it so I can enter more commands?

Thank you!

/close thread.

I figured it out. Thanks.

Just in case someone stumbles across the same problem as you encountered could you please post the solution to your problem? As I’m sure you’re well-aware, it is quite annoying to search for a problem on Google, find the perfect forum thread describing it and find no solution.

You’ll need to learn how to use the vi editor. A few tips:

open a file:

vi filename

Vi has two modes. Command mode and edit mode. Initially you are in command mode. To go into edit mode press i . Then you can type whatever it is you want to. When you are done press esc to go into command mode. Then press colon : and wq to write the file to disk and quit.

Or just [noparse]:x[/noparse] :slight_smile:

Or :q! when things have gone terribly wrong and you want to quit without saving.

If you are using PICO editor, then you may …

pico filename

The file will then be opened and you would be able to make the changes. Once done you have two options

Ctrl O

  • this is to write out

Ctrl X

  • to save your work

If you are stuck inside pico, Ctrl G will give you the online pico help