100%
  • Home
  • Courses
    • View All
Login
  • Home
  • Courses
  • Log In
  • View All
Home Command Line Course Linux Task

Course Lessons

Command Line Course

1 Overview
2 Terminology
3 Keyboard Shortcuts
4 Command Line Basics
5 Pre-Task
6 Install Software Tools
7 Install Vagrant
8 Linux Task
9 Useful Links
Return to Command Line Course

Trainer(s)

There is no group/trainer

Command Line Course

Linux Task
  1. Restart MySQL service using Terminal (Information about controlling services can be found here.
    Try All methods described in the document.
  2. Use a command to show the current working directory, and list the directory contents with and without hidden files, and in the short and long format.
  3. Change the Password of your account to wisdmlabs using terminal
  4. Create a user named wdm with password wisdmlabs with account expiry date as 6 February 2021. Add this user to group www-data
  5. Make a directory called WDMLINUX and change the current working directory to the new directory.
  6. In the WDMLINUX directory create a new folder called A1 and A2.
  7. List the folders, then remove the A2 directory and list the folders again to show that it is no longer present.
  8. Display the manpage for ls, but redirect the output into temp.txt, then use the cat, less, and more commands to display the new file.
  9. Display the initial 10 lines and final 5 lines of temp.txt with the obvious Linux commands.
  10. Change the working directory to A1 and use gedit from the command line to create A1.header with the following personal information:
    1. Name:
    2. Email:
    3. Date:
  11. Exit gedit and copy the new file A1.header to A1.backup. Verify that both files exist by listing the directory.
  12. Use a command to show the difference between the files, then edit A1.backup and change one line, then run the difference command again.
  13. Rename the A1.backup file to A1.old, then list the directory, and remove the A1.old file, and list the directory again.
  14. List the directory with a long format, then toggle the group read protections on the A1.header file. List the directory again to verify the protection has changed.
  15. Show the processes currently running, and pipe the output to grep, matching only processes owned by root.
  16. Start gedit from the launcher, not the command line, then terminate the process using the command line, and verify that it goes away. Be careful!
  17. Get the system date and time, then repeat the same command using the timing command to find out how long the command takes to execute.
  18. Ask the system where the mkdir command is found in the filesystem, and do a listing of that directory to see the commands that reside there.
  19. Find out the list of all software tools installed. Pipe the contents of the command to less and find out the version of installed apache in the output you see.
  20. Perform the above task again but instead of piping content to less command, pipe it to more command.
  21. Redirect the output of the echo command to a file and examine the file to make sure it contains the string you asked the system to echo.
  22. Use the history command to display the last 20 commands you typed into the terminal window.
  23. Search for the last instance of the mkdir command using the history search mechanism described in the slides.
  24. Use ifconfig command in terminal window to show your network configuration
  25. Use the ping command to ping your colleague. (Ask your colleague for his/her IP address)
  26. Find out the IP address of wisdmlabs.com (Do not use ping command.)
  27. Enable Firewall on your computer. Search on the uncomplicated firewall for Ubuntu. Enable Port 32 on your computer. Check if the port is opened. After confirming that, close the port.
  28. Search for ports opened on server hosting the website wisdmlabs.mirealux.com
  29. Find out your current IP from ip command ( ifconfig was deprecated in the year 2012 and was removed in the Ubuntu 18. Use ip instead ). Note it down. Stop your networking service. Set this IP address as static IP address in your computer using the terminal.
    You can use 255.255.255.0 as netmask and 192.168.2.1 as gateway while setting the static IP address. Once it is set, start the networking service again.
    Check if your IP address is set correctly by firing ifconfig command. Discuss with your mentor first before trying this command, as it can create problems with networking.
  30. Find all .sh files on your computer. (Study locate and find command)
  31. Find out information about Processor and RAM.
  32. Display list of all open ports on your own system
  33. Study top command and try different parameters that can be passed to top command.
  34. Download https://wordpress.org/latest.zip file in /var/www/html directory. Unzip the downloaded zipped file. It will create a new folder named ‘wordpress’ and unzip in that directory.
  35. cd to the directory wordpress and search for all files which contain the string ‘do_action’.
  36. Create a new file named ‘robots.txt’ in wordpress directory. Edit that file using vim command and add the following content in that file: User-agent: *
    Allow: / Save the file. Check the content of the file using less command. Fire a command in terminal which will replace Allow with Disallow in robots.txt. Confirm that replacement has been taken place by viewing the content of that file using cat command.
  1. Change permission of all files in that wordpress directory to 644 and all folders to 755
  2. Change owner and group of all files and folders in that wordpress directory to www-data.
  3. wordpress directory contains the file readme.html. Make that file blank.
  4. Create a zip file which should contain wp-admin folder, wp-config.php, xmlrpc.php, wp-cron.php and robots.txt files. Name of that folder should be wp-sample.zip
  5. Type CTRL-D to terminate logging, and move A1.log from the home directory to the A1 folder.
  6. Copy the personal information from A1.header to the top of the A1.log file, using any editor that you would like.

← Previous Lesson

Copyright 2017-25 All Rights Reserved | Designed by WisdmLabs