Basic Linux Tutorial

Part 1

  1. Create a folder in the home directory titled “tutorial_1”.
  2. Create a file inside the above directory titled “iks.txt”.
  3. Edit the file and add the text “Alongside Dante is 13-year-old Alvic James, who dropped out of school when he was in the first grade. Back then, he explained, his family didn’t have enough money to eat. Alvic says he wants to learn to read and write but because he is needed in the fields he has no time to go to school.”
  4. Search for the word “family” inside it from the command line.
  5. Compress the file and create a tar ball with the title “iks.tar.gz”.
  6. Make a copy of the file “iks.txt” and name the new file “iks_2.txt”
  7. The central log file where all log messages are written is “/var/log/syslog”. Erase the contents of the file iks_2.txt and replace them with the last 50 lines in the system log file.

Part 2

  1. A very common webserver that can be used in the production environment is the apache webserver. This webserver is available in the Ubuntu repository as a free software. In the repository it is identified by the name “apache2”. Once installed the webserver registers itself as a service with the operating system.
  2. Check to see if the apache webserver is installed. If it is not you can install it and then verify if the service is running.
  3. Create a file titled “echo” in the root directory of the webserver with the following contents
#!/bin/bash
while [ 1 -eq 1 ]
do
  echo "Welcome aboard!"
done
  1. Download the file “http://localhost/echo” from the command line. Turn it into an executable.
  2. Create a folder in the /opt/ directory titled “tutorial_2”.
  3. Move the file downloaded in step 4 to the folder tutorial_2 and launch it from there.
  4. The script runs in an infinite while loop. Take another shell and check the amount of memory consumed by the script. You will have to kill the script to terminate it.

2 thoughts on “Basic Linux Tutorial

  1. The last 8 blogs I’ve been to look like autospun garbage and there was not even a understandable sentence. Finally a little material I can use! Thanks a bunch!

Leave a comment