• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

How to record a video of Terminal activity on Linux with a script

AnonyViet by AnonyViet
January 10, 2023
in Network
0

Script command lets you go back to Video on Terminal and replay your commands. This article will come in handy when you want to create a reference of the steps you’ve taken, or you’re creating a guide for others to follow.

Join the channel Telegram of the AnonyViet 👉 Link 👈

How to record a video of Terminal activity on Linux with a script

The script will output a formatted copy of all the commands you have run. It works by going to a sub-shell that records everything you do. The session will be saved as plain text when you exit the shell. This makes Script more reliable than redirected input streams.

Basic usage

Load Script command

The script command can be run without any parameters:

script

A new recording session will begin. Your terminal recording session will be saved to ./typescript. You can specify a different file by giving the script another parameter:

script example_session

Use the shell to execute the sequence of commands you want to record (return). When done, press Ctrl + D or type exit to exit the sub-shell. You will be back in your main shell session.

Now you can check the generated session log:

cat example_session

You’ll see your command interspersed with comments in square brackets. These comments are used by the script to record details about the terminal itself and the events occurring within it.

Since log files are plain text, you are free to modify them in a text editor.

This will be very useful if your session accidentally exposes sensitive information or you want to remove extraneous characters from the log. The script logs everything that happens in your terminal, including backspace keys, newlines, and control characters, some of which may not be necessary.

Add to an existing file

You can add other parameters to “pause” and “resume” command dialing by exiting the sub-shell and starting a new session.

Add the -a parameter to append commands to the specified file. The script will overwrite the contents of the file without this parameter.

script -a example_session

Add time data

Run the script with the -t parameter to specify a path to save the time. Time files are in a two-column format of data. Each entry contains the elapsed time since the last record in the first column. The second column records the number of characters that have been entered, allowing for accurate input speed playback.

script -q -t example_session_timings example_session

Terminal session playback

The scriptreplay command reads the output script’s data to your terminal. Timing data will be used to match each entered character. As if you will see the terminal enter commands automatically, which are recorded by the script.

scriptreplay -t example_session_timings example_session

Some recordings may have a lag that is not what you want or run at a very slow speed. Use the -d parameter to speed up the output.

# Chạy nhanh hơn 4 lần
scriptreplay -d 4 -t timings typescript

You can also use the -m parameter to limit the maximum delay. The next command will be entered up to 2 seconds.

# Độ trễ tối đa 2 giây
scriptreplay -m 2 -t timings typescript

Use with interactive commands

You should not use scripts with highly interactive commands. Script is focused on capturing text-based output, not commands that control your terminal. The script is not suitable for use with non-interactive shells.

Other choices

The -c parameter to the script allows you to specify a command. When this mode is used, the script runs the command and logs its output, instead of creating a new shell. This can be more efficient in capturing output data.

The -f parameter instructs the script to write directly to the session log after each event. This improves safety by ensuring output is recorded immediately.

The script’s manual page also states that this parameter can also be used to monitor the user’s terminal in real time.

Scripts generally do not accept a symlink as a path. The –force parameter allows to overcome the above situation.

summary

script allows you to record your Terminal commands into plain text files with exact time each command. You can check, share and replay them in your terminal using scriptreplay.

For best results, run the scriptreplay command in the same Terminal session that you used with the script.

Alternatively, you can also use These 5 tips to decorate the Terminal interface.

The article achieved: 5/5 – (100 votes)

Tags: activityLinuxrecordscriptTerminalvideo
Previous Post

How to Download Videos from Instagram

Next Post

Lesson 184: How to use the Forecast function in Excel

AnonyViet

AnonyViet

Related Posts

How to fix the error of Wireguard Client not being able to access the Internet when NAT twice
Network

How to fix the error of Wireguard Client not being able to access the Internet when NAT twice

November 20, 2025
How to configure dynamic IP as static IP with Cloudflare to do Lab at home
Network

How to configure dynamic IP as static IP with Cloudflare to do Lab at home

November 19, 2025
What is Direct Connect AWS? Benefits when businesses use Direct Connect AWS
Network

What is Direct Connect AWS? Benefits when businesses use Direct Connect AWS

October 29, 2025
Namecheap offers 3 Domains for alt=
Network

Namecheap offers 3 Domains for $0

October 7, 2025
Proxy vượt Cloudflare là gì? Giải pháp hạn chế Captcha Cloudflare bằng Proxy dân cư
Network

Proxy vượt Cloudflare là gì? Giải pháp hạn chế Captcha Cloudflare bằng Proxy dân cư

October 1, 2025
Renova Cloud – The leading AWS management service in Vietnam today
Network

Renova Cloud – The leading AWS management service in Vietnam today

August 26, 2025
Next Post
Lesson 184: How to use the Forecast function in Excel

Lesson 184: How to use the Forecast function in Excel

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

5+ prompts to create sparkling Christmas photos for mothers and babies at home

5+ prompts to create sparkling Christmas photos for mothers and babies at home

December 17, 2025
How to Clean Up Your Computer to Speed ​​Up Windows Faster

How to Clean Up Your Computer to Speed ​​Up Windows Faster

December 16, 2025
Share Snowfall Code for Website to celebrate Christmas

Share Snowfall Code for Website to celebrate Christmas

December 16, 2025
How to build web applications in just minutes with Youware

How to build web applications in just minutes with Youware

December 15, 2025
5+ prompts to create sparkling Christmas photos for mothers and babies at home

5+ prompts to create sparkling Christmas photos for mothers and babies at home

December 17, 2025
How to Clean Up Your Computer to Speed ​​Up Windows Faster

How to Clean Up Your Computer to Speed ​​Up Windows Faster

December 16, 2025
Share Snowfall Code for Website to celebrate Christmas

Share Snowfall Code for Website to celebrate Christmas

December 16, 2025
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

5+ prompts to create sparkling Christmas photos for mothers and babies at home

5+ prompts to create sparkling Christmas photos for mothers and babies at home

December 17, 2025
How to Clean Up Your Computer to Speed ​​Up Windows Faster

How to Clean Up Your Computer to Speed ​​Up Windows Faster

December 16, 2025
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

trang chủ f168 nhà cái 78win https://www.qq8827.com/ https://go99.ae.org/ https://nohu90.bid/

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

trang chủ f168 nhà cái 78win https://www.qq8827.com/ https://go99.ae.org/ https://nohu90.bid/

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply