Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

SYSTEMS ADMINISTRATION - POSSIBLE

1. The dmesg command


a. Shows user login logoff attempts
b. Shows the syslog file for info messages
c. Kernel log messages
d. Shows the daemon log messages

2. Which command is used to set terminal IO characteristic?


a. Tty b. ctty c. ptty d. stty

3. Which command is used to record a user login session in a file


a. Macro b. read c. script d. none of the above

4. Which command is used to display the operating system name


a. OS b. Unix c. kernel d. uname

5. Which command is used to display the unix version


a. Uname -r b. uname-n c. uname-t d. kernel

6. Which command is used to print a file


a. Print b. ptr c. lpr d. none of the above

7. Find /-name “*” will


a. List all files and directories recursively starting from/
b. List a file named * in/
c. List all files in/directory
d. List all files and directories in/ directory

8. Which command is used to view compressed text file contents


a. Cat b. type c. zcat d. print

9. Which command changes a file’s group owner


a. Cgrp b. chgrp c. change d. group

10. Which command is used to extract a column from a text file


a. Paste b. get c. cut d. tar

11. Which command is used to display disk consumption of a specific directory


a. Du b. ds c. dd d. dds

12. Which command is used to perform backup in unix?


a. Backup b. cpio c. zip d. gzip

13. Which command creates an empty file if file does not exist?
a. Cat b. touch c. ed d. read
14. Which option of rm command is used to remove a directory with all its subdirectories
a. -b b. -o c. -p d. -r

15. Which command is used to identify file type?


a. Type b. File c. Finfo d. Info

16. Command used to determine the path of an executable file is


a. Which b. where c. wexec d. what

17. Command use to count number of character in a file is


a. Grep b. wc c. count d. cut

18. which of these commands could you use to show one page of output at a time?
a. Less b. sed c. pause d. grep

19. Which commands will give you information about how much disk space each file in the
current directory uses?
a. Ls-l b. ls- la c. du d. ls-a

20. Which of the following command output contains userid?


a. Ls b. help c. date d. ls-l

21. Which command is used to display all he files including hidden files in your current and
its subdirectories?
a. Ls-aR b. ls- c. ls-R d. ls-I

22. Which of the following commands can be used to copy files across systems?
a. Ssh b. telnet c. rsh d. ftp

23. Pwd command displays


a. User password b. password file content c. present working
directory d. none of the mentioned

24. Which of the following commands can be used to change default permissions for files
and directories at the time of creation
a. Chmod b. chown c. umask d. chgrp

25. Which tar command option is used to list the files in a tape archive format?
a. Cvf b. tvf c. xvf d. ovf

26. Which of the following commands will allow the user to search contents of a file for a
particular pattern
a. Touch b. grep c. find d. ls

27. User’s Primary Group id is listed in which file, at the time of creation of the user (on a
standard Unix system)
a. /etc/passwd b. /etc/groups c./etc/login d. /etc/profile
28. The encrypted password of a user is stored in
a. /etc/shadow b. /etc/enpassword c. /etc/.passwd d. /etc/passwd

29. A user can change the default log-in shell using


a. Chmod b. chsh c. rmsh d.
tchsh

30. Which of the following identifiers associated with a process decide its privilege level
a. Uid b. suid c. euid d. gid

31. The /etc/passwd file doesn’t contain


a. Userid
b. Home directory for a user
c. Login shell name
d. None of the above

32. User id 0 is
a. An invalid user id
b. The id of the root user
c. The id of a user when the users account is deleted
d. None of the above

33. The login shell is


a. The shell program that runs when the user logs in
b. The shell program that authenticates the user while logging in
c. Common shell for all the users that belong to the same group
d. None of the above

34. Which of the following command can be used to change the user password?
a. User cant change the password
b. Passwd
c. Passd
d. Pwd

35. What does the following command do? Who|wc-l


a. List the number of users logged in
b. List the users
c. List the number of users in the system
d. Display the content of who command
36. By default, a linux users falls under which group?
a. Staff b. others c. same as userid(UPG) d. system

37. Which of the following files need to be referred for users secondary group?
a. /etc/passwd b. /etc/shadow c. /etc/group d. /etc/profile

38. Using which command you find resource limits to the session?
a. Rlimit b. ulimit c. setrlimit d. getrlimit

39. Which option of ls command used to view file inode number


a. -l b.-o c. -a d. -i

40. If a program executing in background attempts to read from STDIN


a. It is terminated
b. Its execution is suspended
c. STDIN is made available to it
d. None of the mentioned

41. We can change the priority of running process using


a. Nice
b. Renice
c. Priority cannot be changed for a running process
d. Only superuser can change the priority

42. Which command is used to bring e background process to foreground?


a. Bg b. fg c. background d. foreground

43. How to run a process in the background


a. & b. * c. ? d. l

44. Which command can be executed by a user who is already logged into the system, in
order to change to the root user?
a. Su b. root c. chroot d. user

45. Process information in the current shell can be obtained by using


a. Kill b. bg c. fg d. ps

46. Which signal is sent by the command “kil-9”?


a. INT b. TERM c. KILL d. STOP

47. Which of the following values for STAT column of ps command is not true
a. Status R means running
b. Status S means sleeping
c. Status E means exited
d. Status Z means zombie

48. When a child process exits before the parent process exits, which of the following is true:
a. The child process becomes defunct
b. The parent process becomes defunct
c. If the parent process does not handle SIGCHLD, the child process becomes a
zombie
d. None of the above

49. Which of the following statemen is FALSE?


a. Unix supports multiple users
b. Linux is an open source operating system and the source code is shared
c. Shell takes care of inter process communication
d. Shell provides the feature of I/O Redirection

50. Nohup is used to


a. Automatically hang up the process after logout
b. Continue the process after logout
c. Creates background process
d. Manually hang up the process after logout
SECTION B
1. Briefly and concisely describe the following in linux, giving one example each
a. Kernel
The Kernel is the essential center of a computer operating system, the core that
provides basic services for all other parts of the operating system. A synonym is
nucleus.

b. GUI (Graphic User Interface)


A graphical user interface is a human -computer interface (i.e a way for humans to
interact with computers) that uses windows, icons and menus and which can be
manipulated by a mouse (and often to a limited extent by a keyboard as well)

2. Answer the following questions with respect to Backups


a. Explain five data repository models that can be adopted by your company
b. Recommend five types of storage media for consideration by management as the
CTO of your company.

3. What is a shell Variable?


A variable is a character string which we assign a value. The value assigned could be
number, text, filename, device, or any other type of data. A variable is nothing more than
a pointer to the actual data. The shell enables you to create, assign and delete varaibles

a. Write the syntax to set a shell variable called files to account.txt, report.txt and
notes.txt
$files= “accounts.txt report.txt notes.txt”

4. Explain the difference between a Relative path and an absolute path in the Linux
Directory Structure
An absolute path is a pathname that starts from the root path and specifies all
directories between the root path and the specified directory or file whilst a relative
path specifies some abbreviations for traversing up the directory structure and down
to another directory or file in the same directory tree.

5. Explain 5 reasons that backups are necessary


i. Machine and hardware failure
ii. Human Errors
iii. Natural Disaster
iv. Provide constant uptime
v. Theft

b. Give 3 types of backup media


i. Flash Drive
ii. Hard Drive
iii. Magnetic Media

1. How to create a user? Brief with full syntax


/usr/sbin/useradd -u uid -g gid -c " User Descriptions" -m -d "Home Directory Path" -s
"Shell" username

2. What are the important files for User Management task?


/etc/passwd
/etc/shadow
/etc/group
/etc/default/passwd
/etc/default/login

3. What is the difference between “su UserID” ad “su-UserID”?


"su UserID" - Doesn't check the PATH and Current Working Directory
"su - UserID" - Load the User's Profiles (PATH/Current Working Directory)

4. Default permission of Passwd/Shadow/Group files?


- /etc/passwd - 644
/etc/passwd file is having 7 fields
username:password:uid:gid:comment:home-directory-path:login-shell

- /etc/shadow- 644
/etc/shadow file is having 9 fields
loginID:password:lastchg:min:max:warn:inactive:expire:reserved

- /etc/group - 400
etc/group file is having 4 fields
groupname:group-pwd:GID:user-list

5. How to view the list of users who currently logged in the system?
"who" command will show the users who logged in the current system.
The command refers /var/adm/utmpx to obtain the information.

6. How to view the user’s login and logout details


"last " command will show the users login and logout details.
The command refers /var/adm/wtmpx to obtain the information.

7. How to check primary and secondary group of one user?


"id -a username" will show the user's Primary and Secondary groups.

8. How to rename the existing user ID?


# usermod -l <newname> <oldname>

9. How to lock the User Account?


# passwd -l UserID

10. How to unlock the User Account?


# passwd -u <UserID>

11. What is the Linux?


A Linux shell is a command interpreter

12. How does administrator know his present working directory on the linux shell?
Pwd

13. What would be the command to change directory to /etc/var/www/html


Ed ‘/etc/ver/www/html’

14. What will be m current directory if I should enter a change directory command with ~ as
an argument
This will take you to the home directory of the current user

15. State the difference between ls -a and ls-R


Ls-a is a command to list all files including hidden files while ls-R provides
directory listing recursively

16. What command will be required to create an empty file or update a timestamp on an
existing file
Touch

17. How do you rename a file file1.txt to file2.txt?


Mv.file1.txt file2.txt

18. You are required to create a zip file from a directory called students?
Zip-r students.zip students

19. Unzip the zip file created in the previous question


Unzip.students zip

20. How to list hidden files from the command line?


‘ls-a’ <Folder_Name>

21. How to change the password of user from the Command line
‘passwd <User-Name>’
22. What is a process?
Any program in execution is called a process

23. What is soft link?


Soft link is a method to create shortcuts in linux. It is like the windows shortcut
feature

24. How to determine the hostname of a Linux box?


On typing the hostname command on terminal we can determine the hostname of
a Linux Server

25. What is a Cron Job?


The software utility Cron is a time-based job scheduler in Unix-like computer
operating systems

26. How to make the user account as non-expriry ?


# passwd -x -1 <userID>

27. How do we set force passwd change for User's first login ?
# passwd -f <UserID>

28. How to delete the User ID ?


# userdel <UserID> or # userdel -r <UserID>

29. Type of SHELLs ? What is initialization file for those SHELLS ?

/bin/bash - Bourne Again shell


/bin/csh - C shell
/bin/ksh - Korn shell
/bin/tcsh - TC shell
/bin/zsh - Z shell

30. How to Check the User's Crontabs ? How to allow the User to access the Cron?
# crontab -l <username>
or
# ls -ltr /var/spool/cron/crontabs/

31. How to check User's Present Working Directory Path? How to check the Obsolete
Path of running process ?
Find the Present Working Directory Path
# pwd

Find the Obsolete Path of Process.


# pwdx

32. How to view details information about the User?


"finger username" will show the details about the user.
COMMAND
1. Cat To display the content of files
2. Chmod It is used to change file permission
3. Cp It is used to copy files and or directories
4. Df It is used to check how much space is left on the current drive
5. Dmesg It is used to examine or control kernel ring buffer
6. Du It is used to find which directory is taking much space
7. Echo It is used to display the content of a variable or string
8. Fg It is used to run processes at the foreground
9. Find It is used to scan file systems to locate files
10. Fsck It is used to check file system
11. Grep It is used to filter the content of a file
12. Groupadd It is used to create a new group
13. Groupmod It is used to modify a group definition on the system
14. Halt It is used to power off the system
15. Head It is used to display top few lines of a file
16. History It is used to history in unix
17. Id It is used to display op few lines of file
18. Ifconfig It is used to detect all interface cards
19. Init Process control initialization
20. Jobs It is used to display the content of a shell
21. Kill -9 It terminate all processes that are possible to be killed or terminated
22. Kill -nohup It is used to terminate or kill nohup process running particularly or a
server
23. Locate It is used to find files by name
24. Ls -t It is used to list directory content in order of access time
25. Lsof It is used to list connected files
26. Mkdir It is used to create a directory
27. Mkdir-p It is used to make parent directories before creating sub-
directories
28. more it is used to display the content of a file, one screen at an time
29. mv it is used to more or rename files and or directory
30. netstat it is used to show connected or running services
31. nslookup it is used to name server lookup
32. passwd it is used to change password
33. ping it is used to check if a particular service is available to the internet
34. ps it is used to monitor a running process
35. pushd it is used for changing directories
36. pwd it is used to print the current working directory
37. rm it is used to remove file and or directory
38. rpm it is used for managing software packages
39. runlevel it is used to list the current or previous running level
40. scp it is used for transferring files
41. sftp it is used for securing transfer files
42. sort it is used to arrange words or letters in alphabetical order
43. su it is used to switch users
44. telnet it is used to establish a connection with the telnet protocol
45. top it is used to monitor a running process
46. touch it is used to create an empty file
47. traceroute it is used to go through the various hops of a service
48. umount it is used to detach a file system mention from the file hierarchy
49. uname -a it is used to identify kernel on a machine
50. uptime it is used to see how long a server has been running or booted
51. useradd it is used to create a new user
52. usermod it is used to modify user definition on a system
53. watch it is used to execute a program periodically, showing output fullscreen
54. wc it is used to print newline, word and byte count for each file

You might also like