---

Basic Linux Interview Questions and Answers – Part II

Continuing the Interview Series, we are giving 10 Questions here, in this article. These questions and the questions in the future articles doesn’t necessarily means they were asked in any interview. We are presenting you an interactive learning platform through these kind of posts, which surely will be helpful.

Q.1: Which command is used to record a user login session in a file?
macro
read
script
record
sessionrecord

Answer: The ‘script’ command is used to record a user’s login session in a file. Script command can be implemented in a shell script or can directly be used in terminal. Here is an example which records everything between script and exit.