What do system and script commands help users do?
Gather system information and apply script-based environment changes.
What two key commands are discussed?
uname and source.
What is the purpose of the ‘uname’ command?
To retrieve system information such as kernel name, version, and system architecture.
What does ‘uname -r’ show?
Kernel release.
What does ‘uname -i’ display?
Hardware platform.
What does ‘uname -a’ print?
All system details.
Provide an example of using uname in a script.
echo “System Info: $(uname -a)”»_space; /var/log/sys_update.log
What is the purpose of the example uname command?
Captures system information and appends it to a log file before a kernel update.
What does the ‘source’ command do?
Executes scripts in the current shell session.
Why is ‘source’ useful?
It applies script changes immediately without starting a new shell.
What can the ‘source’ command update?
Environment variables, aliases, and configuration settings.
Example of using the source command?
source /etc/profile.d/custom_vars.sh && echo “Environment variables updated successfully.”
What does the example source command do?
Reloads environment variable script and confirms success if no errors occur.