Which command is used to record a user login session in a file?
A) ls
B) cat
C) ssh
D) script
Answer:
D) script
Explanation:
The “script” command in Unix-like operating systems is used to record a user’s login session, including all the commands and their outputs, into a file. This is often used for auditing purposes or for keeping a log of activities during a terminal session.