SAC Automation, Scripting, and Virtualization 1 — Questions and Answers
Question 1: Which scripting language is most commonly used for Windows system administration?
- Bash
- Python
- PowerShell (Correct answer)
- Perl
Correct answer: PowerShell
PowerShell is a powerful command-line shell and scripting language developed by Microsoft, specifically designed for system administration tasks on Windows. It provides extensive capabilities for automating administrative tasks, managing configurations, and interacting with various Windows components and services through cmdlets. Its object-oriented nature makes it highly efficient for complex automation.
Question 2: What is the purpose of a cron job in Linux?
- To start GUI applications
- To manage user permissions
- To schedule repetitive tasks (Correct answer)
- To monitor hardware temperature
Correct answer: To schedule repetitive tasks
A cron job in Linux is a scheduled command that runs automatically at specified intervals. It is used to automate repetitive system administration tasks, such as backups, log rotation, system cleanup, or custom script execution. This ensures that these operations are performed consistently without manual intervention, improving system reliability and efficiency.
Question 3: Which command is used to create a virtual machine in VirtualBox from the command line?
- vmctl
- virt-create
- VBoxManage (Correct answer)
- vmrun
Correct answer: VBoxManage
`VBoxManage` is the command-line interface for Oracle VM VirtualBox. It allows users to control all aspects of VirtualBox, including creating, configuring, starting, and stopping virtual machines, as well as managing virtual disks and networks. This tool is essential for scripting and automating VirtualBox operations.
Question 4: What is a key benefit of using virtualization?
- Increased electricity usage
- Reduced system security
- Limited OS support
- Better resource utilization (Correct answer)
Correct answer: Better resource utilization
Virtualization allows multiple operating systems and applications to run concurrently on a single physical server, each within its own isolated virtual machine. This significantly improves resource utilization by consolidating workloads, reducing the need for multiple physical machines. This consolidation leads to savings in hardware, power, and cooling costs.
Question 5: Which command can be used to execute a shell script in Linux?
- run
- bash-only
- ./scriptname (Correct answer)
- exec.sh
Correct answer: ./scriptname
In Linux, `.` refers to the current directory. To execute a shell script located in the current directory, you need to explicitly tell the shell where to find it by using `./scriptname`. This ensures that the script is run using the appropriate interpreter (e.g., bash, sh) defined in its shebang line, if executable permissions are set.
Question 6: Which tool is commonly used to manage virtual machines on Linux servers?
- Docker
- KVM (Correct answer)
- GRUB
- LVM
Correct answer: KVM
KVM (Kernel-based Virtual Machine) is an open-source virtualization technology built into the Linux kernel that turns it into a hypervisor. It allows a Linux host to run multiple isolated virtual machines efficiently. KVM is a popular and powerful solution for managing virtualized environments on Linux servers, offering high performance and scalability.
Which scripting language is most commonly used for Windows system administration?