Module 4 - Assignment
Problem Statement: Write a script to echo the following message before installing httpd in the system. The message is “You are using the system as” Change the file permission and test the script.
- Using nano we create the script
nano install_httpd.sh
The contents of the script:
#!/bin/bash
# Echo the username
echo "You are using the system as $(whoami)"
# Install httpd
sudo apt update && sudo apt install -y httpd
I’m using Ubuntu
- Make the script executable
chmod +x install_httpd.sh
- Executing the script
./install_httpd.sh