In Linux, how does one record and play back terminal sessions?

Source: Internet
Author: User
Suppose you are a reliable gentleman. whenever friends and family encounter various issues related to Linux, they always ask for help immediately. Someone will ask you how to install and configure a tool. at this time, you will want to know the specific steps. But what should I do if the other party is not with you? Solution

Suppose you are a reliable gentleman. whenever friends and family encounter various issues related to Linux, they always ask for help immediately. Someone will ask you how to install and configure a tool. at this time, you will want to know the specific steps. But what should I do if the other party is not with you? There may be many solutions. for example, you can record the specific steps in the document, and then send them via email; or call and inform the other party in detail, but the most clear solution is your own demonstration. If you only need one terminal for demonstration, the best way is to use the terminal screen play or terminal session recorder.

In this tutorial, I will demonstrate how to record and play back terminal sessions on Linux.

There are several online service websites (such as showterm. io or asciinema.org) that allow you to record and share your terminal sessions on the Internet. However, if you want to ensure privacy or store the recorded content locally, we recommend that you use TermRecord.

TermRecord is an open-source tool written in Python. it records terminal sessions into an independent HTML file. Since the output file in HTML format is an independent file, anyone can use a cross-platform Web browser to play back the recorded terminal session.

Install TermRecord on Linux

TermRecord is provided as a Python package, so you can install the package using the pip command.

First, install pip on your Linux system. For more information, see http://ask.xmodulo.com/install-pip-linux.html. Then, install TermRecord as follows.

 
 
  1. ___FCKpd___0nbsp;sudo pip install TermRecord 

Use TermRecord recording terminal session

It is easy to use the TermRecord recording terminal for session. You only need to run the following command to start recording.

 
 
  1. ___FCKpd___1nbsp;TermRecord -o /path/to/output_html 

For example, to save the current terminal session in/tmp/session.html, run the following command:

 
 
  1. ___FCKpd___2nbsp;TermRecord -o /tmp/session.html 

Then, any command entered from the terminal will be saved to the HTML output file. The output file also stores time information, so that the entire terminal session can be played back at the same speed as you typed.

To stop recording, type "exit" and press enter.

If you open HTML output results in a Web browser, you can play, pause, or restart stored sessions. You can also adjust the playback speed. that is, you can speed up or slow session playback as needed, as you like.

The following is an example of terminal screen play (http://xmodulo.com/wp-content/uploads/2014/05/session.html) generated by TermRecord ).

Link: http://xmodulo.com/2014/05/record-replay-terminal-session-linux.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.