These exercises were given to the participants of the DevOps Workshop on using Linux as a Virtual OS on Windows (or Mac or another Linux).

A few exercises that you could do to practice what we have learned during the workshop. Some will go way beyond it and make you learn a lot more about using Linux on the command line.

  1. Set up another Virtual Box and Install Ubuntu. This time use a different IP address.
  2. Make sure you can ping the machine from your host machine (Your Windows or OSX machine)
  3. Install the ssh server and check that you can connect to the guest machine using Putty or some other ssh client.
  4. Install Nginx on this new machine
  5. Check if you can visit the page using your browser on your host machine
  6. Edit the default html file to show your name instead, or in addition to the default text
  7. Check out what kind of options does the "ls" command have, experiment with it.
  8. Is "ls" already an "alias" in your computer?
  9. Read the manual of ls by typing in "man ls" You can use space to advanced in the manual. You can use "q" to quit.
  10. Once you find a flag combination that you like create an alias so whenever you type a single "l" it will execute "ls" with your favorite flags.
  11. Make the above alias permanent in your shell. (Try by logging in in another putty session and check if the new l alias is available there too!)
  12. Create a file called workshop.txt add some notes to it.

So far is basically the same as we had during the workshop. Use the slides as your guide.

Additional tasks

  1. Create a new file called a.txt with "hello" in it.
  2. Create a new file called b.txt with "world" in it.
  3. Rename a.txt to be b.txt (using mv) observe that Linux does not ask for confirmation when you overwrite a file.
  4. Find out how to convince mv to ask for permission before overwriting a file.
  5. Try the above with "cp" that stand for copy.

  1. Create a sub-directory in your home directory called "web".
  2. Inside the "web" directory create a file called "index.html" with some content.
  3. Find out where where is the default configuration file of nginx (hint: it was in the slides) and change it so that the default directory will be the "web" sub-directory of home directory. (how do you know the full path to the "web" directory?
  4. reload the configuration file of Nginx by running sudo service nginx reload.
  5. Reload your browser and check if the new page is from the "web" directory.
  6. If you managed to do this, you can now create additional files in this directory without root privileges.