What does shell interaction involve?
Starting, controlling, and ending sessions.
Which commands help manage process invocation and shell behavior?
Ctrl+D and exec.
What does Ctrl+D do?
Signals end of input and closes the session.
What does exec do?
Replaces the current process with another.
What signal does Ctrl+D send?
End-of-file (EOF) signal to the shell.
What happens when Ctrl+D is pressed?
Closes the current shell session gracefully.
Does Ctrl+D require typing a command?
No, it does not.
Example of Ctrl+D usage?
Pressing Ctrl+D after finishing tasks logs out and returns to login prompt.
What does exec command do?
Replaces current shell or process with a new one.
Syntax for exec command?
exec [command] [arguments].
Does exec return to original shell after execution?
No, it does not.
Example of exec usage for SSH?
exec ssh admin@server02 replaces current session with SSH login.
Example of exec usage for output redirection?
exec > session.log 2>&1 redirects output and errors to session.log.
What does ‘exec > session.log 2>&1’ do?
Redirects standard output and error to session.log.
What happens after exec redirection?
Future commands write output and errors to session.log.
Will the screen display outputs after exec redirection?
No, outputs will no longer display on screen.
Why use exec for SSH?
To replace the shell with a remote session without returning.
Why use exec for redirection?
To capture all outputs and errors in a file for logging.
What is the overall benefit of exec?
Efficiently replace processes and manage session behavior.
What is the overall benefit of Ctrl+D?
Gracefully end shell sessions without extra commands.