DEV Community

Kenneth Mahon
Kenneth Mahon

Posted on

Practical Lab Questions on Linux(Day 7)

Hello guys!!! How did we find the Lab questions? interesting right?? we still have more to chechk out which i will be sharing but before i share it, i will like to share a link to a free course on linux where you will be given certificate on completing the course. Here is mine below

free course on linux
link: free course on Linux

let's look at some practical questions i played with

Practical Questions

  • Using the grep command, search for the word "error" in a file called "system.log".

  • Using the pwd command, display the full path of your current working directory.

  • How would you rename a file called "old_name.txt" to "new_name.txt" using the mv command?

  • How would you create a new alias called "c" to be a shortcut for the clear command?

  • Using the date command, display the current date and time on the terminal.

  • How would you use the df command to display the available disk space on your computer?

  • Using the whereis command, find the location of the executable file for the grep command.

  • Using the history command, display a list of the commands you have previously executed in this session.

  • How would you switch to the root user using the sudo command?

  • Using the uname command, display information about your system's kernel and operating system.

*SECTION 2 LINUX FILE REDIRECTION & PERMISSIONS.
*

  1. Can you explain how file permissions work in Linux?
  2. What is the difference between the "chmod" and "chown" commands in Linux?
  3. How can you use file permissions to enhance security on a multi-user system?
  4. What does the setuid permission do on an executable file?
  5. How do you recursively change file permissions for a directory and its contents?
  6. Can you explain what the numbers in octal notation represent when setting file permissions?
  7. How can you view the current file permissions for a file or directory in Linux?
  8. What is the difference between read, write, and execute permissions for files and directories?
  9. Can you explain how to revoke permissions for a user or group on a file or directory?
  10. What are some best practices around file permissions that you would recommend for managing Linux systems?

That is all for Day 7...Day 8 loading

Top comments (0)