How to save running-config to a text file

Unanswered Question
Jan 29th, 2009
User Badges:


I manage lot of router and switch my problem is before I do any changes to configuration file I want to save a copy of it

if I do sh run using putty it just displays one page worth of information and I have to do copy paste one page at a time

is there any easier method to copy paste entire running config to a text file ?


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.6 (10 ratings)
Giuseppe Larosa Thu, 01/29/2009 - 11:41
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Manish,


enable session> logging in putty using connection properties


term len 0

sh run

in this way all the file is placed without need to press for next page

then you stop logging and you have your file.

to have again pages type:

term len 25

putty saves an header with date and time at the beginning after that you have clean text file.

Hope to help


Scott Peterson Tue, 04/08/2014 - 15:36
User Badges:

Thank you for the information, Giuseppe - it was precisely what I needed (5 years after you posted it :).



Joseph W. Doherty Thu, 01/29/2009 - 12:21
User Badges:
  • Super Bronze, 10000 points or more

Another option would be to send either the startup or running config to a TFTP, FTP or RCP server. The file will be text, although believe sequence of LFCR confuses Windows' Notepad but Wordpad renders it correctly.

drissbenattou Mon, 02/02/2009 - 02:42
User Badges:


You can tray to use this commande :

Router# terminal length 0

drissbenattou Mon, 02/02/2009 - 03:56
User Badges:


You can tray to use this commande :

Router# terminal length 0

Mohamad Qayoom Fri, 02/13/2009 - 12:43
User Badges:
  • Bronze, 100 points or more

You can also use the following command from command prompt:

telnet -f fileName.txt x.x.x.x(IP)

Now everything that you do during this telnet session will be recorded in fileName.txt.

lscarbor Fri, 08/29/2014 - 11:10
User Badges:
  • Cisco Employee,



If you are wondering how to copy your save running-config to a text file, my best suggestion would be to copy the outcome of the command line (via the CLI) and then open notepad and past the config there. Afterward, you can obviously save it to the desired folder!


Hope this helps!

Best regards,


jotran Mon, 02/23/2015 - 07:22
User Badges:


I am looking for an equivalent command to "show running | file $fn" in XML on IOS XR routers.

The command or steps I am looking for will help me save a running config in xml format to a file

on the router.





This Discussion