0% found this document useful (0 votes)
11 views6 pages

SA5138

Uploaded by

abeesharajus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views6 pages

SA5138

Uploaded by

abeesharajus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Revison 2021 -Exam November 2023

1. What is the primary objective of the System Administration lab course?

Answer: To provide practical knowledge in applying Linux commands and expertise in shell
scripting for system administration.

2. What is the prerequisite for this course?

Answer: Knowledge in computer and system software from the course “Introduction to IT
Systems.”

3. What is user management in Linux?

Answer: It involves managing user accounts, passwords, and permissions using commands like
useradd, passwd, usermod, etc.

4. How do you create a new user in Linux?

Answer: Use the useradd command.

5. Which command is used to change a user’s password in Linux?

Answer: The passwd command.

6. What does the whoami command do?

Answer: It displays the current logged-in user.

7. How do you display the current working directory in Linux?

Answer: Use the pwd command.

8. What is the purpose of the chmod command?

Answer: To change file or directory permissions.


9. How do you add a new group in Linux?

Answer: Use the groupadd command.

10. What is the function of the ls command?

Answer: It lists the files and directories in the current directory.

11. How do you create a directory in Linux?

Answer: Use the mkdir command.

12. Which command is used to delete a directory in Linux?

Answer: Use the rmdir command for empty directories or rm -r for non-empty ones.

13. What is shell scripting?

Answer: It is a script written for the shell to automate tasks in the Linux environment.

14. Name any two types of shells in Linux.

Answer: Bash shell and Z shell.

15. What is the purpose of pipes (|) in Linux?

Answer: To pass the output of one command as input to another.

16. How does the grep command work?

Answer: It searches for a specific pattern in files or input.

17. What is the role of the sort command in Linux?


Answer: To sort lines of text files in ascending or descending order.

18. How do you display the first few lines of a file in Linux?

Answer: Use the head command.

19. What does the ps command show?

Answer: It displays information about currently running processes.

20. How can you terminate a process in Linux?

Answer: Use the kill command with the process ID.

21. What is the difference between cp and mv commands?

Answer: cp copies files/directories, while mv moves or renames them.

22. What is the purpose of the tar command?

Answer: To archive files.

23. Which command is used for backup and restore in Linux?

Answer: Commands like tar, cpio, or dump.

24. What is the fg command used for?

Answer: To bring a background process to the foreground.

25. What is the bg command used for?

Answer: To resume a suspended process in the background.

26. How do you view the disk space usage in Linux?


Answer: Use the df command.

27. What is the free command used for?

Answer: To display the amount of free and used memory in the system.

28. How do you compare two files in Linux?

Answer: Use the diff or cmp command.

29. What does the uniq command do?

Answer: It filters out duplicate lines from a sorted file.

30. How do you redirect the output of a command to a file?

Answer: Use the > operator.

31. What is the purpose of the touch command?

Answer: To create an empty file or update a file’s timestamp.

32. How do you check if a file exists in shell scripting?

Answer: Use the -e option in an if condition.

33. What does the uptime command show?

Answer: It displays how long the system has been running.

34. How can you switch to a different user in Linux?

Answer: Use the su or sudo command.


35. What does the top command do?

Answer: It displays real-time information about processes and system performance.

36. How do you schedule tasks in Linux?

Answer: Use the cron or at command.

37. What is the use of the echo command?

Answer: It prints text or variables to the terminal.

38. How do you change ownership of a file in Linux?

Answer: Use the chown command.

39. What does the wc command do?

Answer: It counts words, lines, characters, and bytes in a file.

40. What is the purpose of the find command?

Answer: To search for files and directories.

41. How do you display the contents of a file page by page?

Answer: Use the more or less command.

42. What is the function of the alias command?

Answer: To create shortcuts for commands.

43. How do you uncompress .gz files in Linux?

Answer: Use the gunzip command.


44. What is the env command used for?

Answer: To display or modify the environment variables.

45. How do you add a user to a group in Linux?

Answer: Use the usermod -aG groupname username command.

46. What does the hostname command do?

Answer: It displays or sets the system’s hostname.

47. What is the cmp command used for?

Answer: To compare two files byte by byte.

48. How do you count the number of lines in a file?

Answer: Use the wc -l command.

49. What is the purpose of the sleep command?

Answer: To pause execution for a specified amount of time.

50. How do you exit a shell script?

Answer: Use the exit command with an optional exit status.

You might also like