How can I open, edit and save a file in PuTTY?

Cheerag Nundlall

Well-known member
Registered
Joined
Oct 12, 2016
Messages
333
Points
18
I am new to Putty, I am trying to learn to manage a VPS. The fist step is learning to use Putty. Do you guys help me to open, edit and save a file in this program? What are the fastest ways to do this job?

Thanks in advance.
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
I would recommend you use the 'vi" Linux text editor when logged into SSH using putty. Putty is an SSH client it does not open and edit files for that you will need a linux text editor such as vi.

open a file

Code:
 vi myfile
Edit the file

Press "insert" on the keyboard then edit the file

Save and exit

Code:
 !wq
Putty does have a nice copy and paste function.

To copy simply drag and highlight what you want to copy, once you release the mouse button this data will be copied to the clipboard. To paste simply right click where you want to paste.
 

EcommIndiaCloudIT

Member
Registered
Joined
Dec 28, 2016
Messages
64
Points
0
Just so you're clear, putty is only an application that gives you the terminal on the remote system. It by in itself does not have any other capabilities (file editing etc.) other than establishing an SSH connection to your remote system.

Once you establish that connection, you are basically on that system and you can use any application that is available on that system to perform the task you need. The only obvious thing is that whatever application it is should be able to run/execute through the command line. Since Linux has always been used more as command line OS than GUI, you have a ton of command line tools to perform literally every function. One such tool is vi editor. There are other editors as well. If you every want a tool, just google it like "x tool for centos" and you shall get one. Most of them are inbuilt by default.

Here is a guide on how to use vi editor.

Remember, you can do anything and everything from the command line. What putty does is just give you a window into the command line of that system, nothing else.
 

MooseLucifer

Well-known member
Registered
Joined
May 20, 2016
Messages
149
Points
28
I am new to Putty, I am trying to learn to manage a VPS. The fist step is learning to use Putty. Do you guys help me to open, edit and save a file in this program? What are the fastest ways to do this job?

Thanks in advance.
I would recommend using nano editor to edit and save content for your files. After connected to your VPS, you can edit your files by using an editor. There are many editors of Linux support you edit file content as vi, emacs,...however I prefer using nano because it is easy to use and control its functions.

If you have not installed nano editor yet, you can use this command

For CentOS:

Code:
yum install nano
For Ubuntu:

Code:
apt-get install nano
to use nano, you type this command

Code:
nano file_name
for example

Code:
nano myfile.txt
This is the sceen of Nano editor

nano-editor.jpg

At the bottom of the screen, you will see shortcut keys when working with nano
^ symbol insteads for Ctrl
Ctrl+O: save file
Ctrl+X: quit the program, you can need to press Y/N
Ctrl+W: search

Good luck to you.
 

cPanelHosting

Member
Hosting Provider
Registered
Joined
Dec 27, 2016
Messages
62
Points
0
cPanelHosting
vi

+1 Recommendation on this. Nano is much easier and user friendly than vi
 

StackArcVPS

Member
Registered
Hosting Provider
Joined
Apr 5, 2017
Messages
56
Points
0
get yourself sublime text editor with filezilla app and use it to transfer and edit files and it will also give you an option to duplicate/edit and upload option
 

RufusBrewer

Member
Registered
Joined
Sep 18, 2013
Messages
19
Points
0
vi

+1 Recommendation on this. Nano is much easier and user friendly than vi
I see vi is more difficult to use.

get yourself sublime text editor with filezilla app and use it to transfer and edit files and it will also give you an option to duplicate/edit and upload option
How to integrate sublime text editor into filezilla? I am using filezilla for transfer files to my hosting but I don't know how to add a good ext editor for it.
 

StackArcVPS

Member
Registered
Hosting Provider
Joined
Apr 5, 2017
Messages
56
Points
0
just install sublime and filezilla and then click on any file in filezilla and right click on it and it will ask for an option to view/open/edit choose that then choose sublime app. it will open in sublime.
 

optimalgeek

Member
Registered
Joined
Mar 15, 2017
Messages
33
Points
0
you can use vi editor to edit a file. Command vi <filename> and to save the file you need to type :wq! . You will be able to save and exit the file.
 

rankmyhub

Well-known member
Registered
Joined
Feb 14, 2017
Messages
193
Points
18
+1 for nano..easy for newbies to terminal and ssh. VI is very powerful, provided that you remember shortcut keys. Members suggested with screenshots and basic commands, good luck with vps.
 
Recommended Threads
Replies
5
Views
3,152
Replies
14
Views
5,914
Replies
7
Views
2,342
fwh
Replies
49
Views
10,570

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top