-
1. What is UNIX?
- an operating system
- a text editor
- software program
- programming language
Show Answer
Answer : Option ( a ) 2. Which part of the UNIX operating system interacts with the hardware?
- Kernel
- Shell
- vi editor
- Application Program
Show Answer
Answer : Option ( a )3. What is a superuser?
- system manager
- normal user
- administrator
- a user with special rights
Show Answer
Answer : Option ( c )4. What is the windowing system of UNIX known as?
- X Window system
- LINUX
- Red Hat
- DOS
Show Answer
Answer : Option ( a )5. Which command is used as an alternative to echo command?
- ls
- printf
- wc
- ps
Show Answer
Answer : Option ( b )6. script command is used for___________
- Recording history
- Recording our session
- Recording passwords
- Recording scripts
Show Answer
Answer : Option ( b )7. Which command is used by the user to change their login password in UNIX?
- man
- reset
- passwd
- cp
Show Answer
Answer : Option ( c )8. For interrupting a command. we can use _____
- ctrl-f
- esc
- ctrl-h
- ctrl-c
Show Answer
Answer : Option ( d )9. Which command is used for printing the current working directory?
- HOME
- cd
- pwd
- dir
Show Answer
Answer : Option ( c )10. Which command is used for creating directories?
- rmdir
- mkdir
- cd
- cp
Show Answer
Answer : Option ( b )11. What does the following command do? $ mkdir dir dir/dir_01/dir_02
- create dir, dir_01 and dir_02
- creates dir_02
- creates dir only
- throws an error
Show Answer
Answer : Option ( a )12. Sometimes we are unable to create a directory because ______________
- The directory may already exist in the current directory
- There may be an ordinary file by the same name in the current directory
- The permissions set for the current directory does not allow the creation
- The directory may exist, there may be an ordinary file, the permissions set for the current directory does not allow the creation
Show Answer
Answer : Option ( d )13. Which command is used for removing an empty directory?
- mkdir
- rmdir
- del
- remove
Show Answer
Answer : Option ( b )14. Which command is used for listing files in a directory?
- ps
- list
- ls
- wc
Show Answer
Answer : Option ( c )15. Which option is used with ls command for long listing of files with seven attributes?
- -a
- -l
- -x
- -i
Show Answer
Answer : Option ( b )16. Apart from displaying file contents. cat command is also used for _____ files.
- Displaying
- Deleting
- Copying
- Creating
Show Answer
Answer : Option ( d )17. Which symbol is used with cat command for creating files?
- >
- <
- *
- /
Show Answer
Answer : Option ( a )18. How can we copy a file into our current directory?
- cp file1
- cp file1.
- cp file*
- none of the mentioned
Show Answer
Answer : Option ( b )19. Which one of the following command can delete a directory which is not empty?
- rm -r
- rmdir
- rm *
- del *
Show Answer
Answer : Option ( a )20. What is the permission of file01 after executing this command? chmod 777 file01
- rwxrwxrwx
- rw-rw-rw
- r–r–r–
- r–r—-
Show Answer
Answer : Option ( a )21. Which command is used to change the ownership of a file?
- chmod
- change
- ch
- chown
Show Answer
Answer : Option ( d )22. What does the following command do? $ vi file001
- Open file named file001
- Edit file named file001
- Delete a file named file001
- Open file if it exists else creates a new file
Show Answer
Answer : Option ( d )23. In which language UNIX is written?
- JAVA
- Python
- C++
- C
Show Answer
Answer : Option ( d )24. Which of the following is not a feature of UNIX?
- Multitasking
- Multiuser
- Portability
- Easy to use
Show Answer
Answer : Option ( d )25. Which of the following is not a part of all the versions of UNIX?
- Kernel and Shell
- Commands and Utilities
- Graphical User Interface - GUI
- System Calls
Show Answer
Answer : Option ( c )26. Which of the following is not true about UNIX?
- Many people can use a UNIX based computer at the same time; hence UNIX is called as a multiuser system
- A user can run multiple programs at the same time; hence UNIX is called a multitasking environment
- UNIX was not written in ‘C’ language
- Linux is also known as a version of UNIX
Show Answer
Answer : Option ( c )27. What are Commands?
- Specific instructions for performing a particular task
- Part of the operating system
- Part of the shell
- Special instructions
Show Answer
Answer : Option ( a )28. Which command is used for extracting the details of the operating system?
- cd
- echo
- uname
- wc
Show Answer
Answer : Option ( c )29. Which of the following is not a valid option of uname?
- -a
- -s
- -v
- -z
Show Answer
Answer : Option ( d )30. Which command is used to display the documentation of commands in UNIX?
- help
- search
- whatis
- man
Show Answer
Answer : Option ( d )31. Which command is used for displaying date and calendar in UNIX?
- date and cal
- DATE and CAL
- date and calendar
- dt and cl
Show Answer
Answer : Option ( a )32. What is the output of who command?
- Display information about users who are currently logged in.
- Display file hierarchy
- Display administrator information
- Display processes
Show Answer
Answer : Option ( a )33. Which command is used for displaying date in the format dd/mm/yyyy ?
- date +%m
- date +%h
- date +”%d/%m/%Y”
- date +”%h %m”
Show Answer
Answer : Option ( c )34. echo command is used for _________
- Displaying errors
- Displaying operating system details
- Displaying diagnostic messages
- Displaying date and time
Show Answer
Answer : Option ( c )35. What are the escape sequences?
- Special characters beginning with a \ (backslash)
- Special commands
- Special utilities
- A sequence of characters
Show Answer
Answer : Option ( a )36. Which of the following is not a valid escape sequence in UNIX?
- \n
- \t
- \v
- \d
Show Answer
Answer : Option ( d )37. we can use _____ for interrupting.
- ctrl-f
- esc
- ctrl-h
- ctrl-c
Show Answer
Answer : Option ( d )38. Which command is used for changing the current directory?
- cd
- cp
- pwd
- rm
Show Answer
Answer : Option ( a )39. The output of ls dir* is ___
- All files in the current directory
- All files in the directory having a filename starting with dir
- No filename is displayed
- Erroneous
Show Answer
Answer : Option ( b )40. Which command is used for displaying contents of a file?
- cp
- rm
- cat
- mkdir
Show Answer
Answer : Option ( c )41. cat command is also used for _____ files.
- Displaying
- Deleting
- Copying
- Creating
Show Answer
Answer : Option ( d )42. If we create a file using cat command with the same filename which already exists in the current directory then
- If we create a file using cat command with the same filename which already exists in the current directory then
- New file will be created separately
- Existing file will be overwritten
- An error will be produced
Show Answer
Answer : Option ( c )43. Which symbol is used to append an existing file?
- >
- <
- >>
- $
Show Answer
Answer : Option ( c )44. Which of the following cannot be performed by cat command?
- Displaying files
- Creating files
- Appending files
- Deleting files
Show Answer
Answer : Option ( d )45. Which of the following can perform by cat command?
- Displaying files
- Creating files
- Appending files
- All of above
Show Answer
Answer : Option ( d )46. What happens if the destination file specified in cp command does not exist?
- File will not be copied
- An error will be produced
- Destination file will be automatically created
- None of the mentioned
Show Answer
Answer : Option ( c )47. What does -i option do in cp command?
- Interactive copying
- Recursively copying
- Updating
- None of the mentioned
Show Answer
Answer : Option ( a )48. Which option is used with cp command for linking files instead of copying?
- -v
- -l
- -f
- -x
Show Answer
Answer : Option ( b )49. Which command is used for removing/deleting files in UNIX?
- rmdir
- rm
- del
- remove
Show Answer
Answer : Option ( b )50. To delete all files in a directory we use ______________
- rmdir *
- mv *
- rm *
- del *
Show Answer
Answer : Option ( c )51. Which option is used with rm command for interactive deletion?
- -i
- -f
- -r
- -R
Show Answer
Answer : Option ( a )52. If we wish to delete a remove a file forcefully. we can use ____ option with rm command.
- -i
- -r
- -R
- -f
Show Answer
Answer : Option ( d )53. Which command is used for renaming files?
- rename
- mv
- cp
- move
Show Answer
Answer : Option ( b )54. What if the destination file specified in mv command already exists?
- It will be deleted
- It will not be affected
- It will be overwritten
- An error will be produced
Show Answer
Answer : Option ( c )55. Which command is used for comparing two files?
- cmp
- comp
- diff
- comm
Show Answer
Answer : Option ( a )56. What is the exit status of cmp command if both the files are identical?
- 0
- 1
- 2
- undefined
Show Answer
Answer : Option ( a )57. Which option is used with cmp command to limit the number of bytes to be compared?
- -n
- -l
- -f
- -b
Show Answer
Answer : Option ( a )58. How can we skip some initial bytes from both the files to be compared?
- using -b option
- using -n option
- using -l option
- using -i option
Show Answer
Answer : Option ( d )59. Which command compares two sorted files line by line?
- cmp
- diff
- comm
- sort
Show Answer
Answer : Option ( c )60. What will be the command if we want to suppress column 1 and column 2 in the output of comm Command?
- comm -12
- comm -1-2
- comm -3
- comm -1,-2
Show Answer
Answer : Option ( a )61. Which command is used to display the differences between files?
- comm
- diff
- cmp
- differ
Show Answer
Answer : Option ( b )62. When two files are identical. what is the output of diff command?
- Files are identical
- Returns prompt
- No output
- Throws an error
Show Answer
Answer : Option ( b )63. Which command is used for counting words, lines, and characters in a file?
- diff
- count
- man
- wc
Show Answer
Answer : Option ( d )64. Which option is used for counting the number of lines in a file only.
- -l
- -W
- -c
- -w
Show Answer
Answer : Option ( a )65. Which option is used for counting the number of words in a file only?
- -l
- -W
- -c
- -w
Show Answer
Answer : Option ( d )66. Which option is used for counting the number of characters in a file only.
- -l
- -W
- -c
- -w
Show Answer
Answer : Option ( c )67. Which command is used for knowing the file type?
- file
- type
- filetype
- type of file
Show Answer
Answer : Option ( a )68. A file can be recognized as an ordinary file or directory by ____ symbol.
- $
- –
- *
- /
Show Answer
Answer : Option ( b )69. How many types of permissions a file has in UNIX?
- 1
- 2
- 3
- 4
Show Answer
Answer : Option ( c )70. Permissions of a file are represented by which of the following characters?
- r,w,x
- e,w,x
- x,w,e
- e,x,w
Show Answer
Answer : Option ( a )71. What is group ownership?
- Group of users who can access the file
- Group of users who can create the file
- Group of users who can edit the file
- Group of users who can delete the file
Show Answer
Answer : Option ( a )72. Which of the following is the default permission set for ordinary files?
- rw-rw-rw-
- rwxrwxrwx
- r–r–r–
- rw-rw-rwx
Show Answer
Answer : Option ( a )73. Which command is used to change the permissions of a file?
- chmod
- ch
- chown
- chgrp
Show Answer
Answer : Option ( a )74. A file named file01 should be readable. writable and executable only by the user(owner). Which one of the following set of command will be used?
- chmod 700 file01
- chmod 000 file01
- chmod 477 file01
- chmod 777 file01
Show Answer
Answer : Option ( a )75. Which command is used to change the group owner of the file?
- chown
- ch
- chgrp
- chmod
Show Answer
Answer : Option ( c )76. Which editor is used by the UNIX system to edit files?
- vi
- notepad
- word
- notepad++
Show Answer
Answer : Option ( a )77. Shell provides us with an interface to the operating system.
- TRUE
- FALSE
Show Answer
Answer : Option ( a )78. On a UNIX system. there can be ____ shells running simultaneously.
- 1
- 2
- many
- 4
Show Answer
Answer : Option ( c )79. There can be multiple kernels on a single UNIX system.
- TRUE
- FALSE
Show Answer
Answer : Option ( b )80. The prompt issued by the shell is called ______
- Prompt
- Command translator
- Command prompt
- Command executor
Show Answer
Answer : Option ( c )81. In UNIX there are ___ major types of shells.
- 2
- 3
- 4
- Many
Show Answer
Answer : Option ( a )82. What is the default symbol for command prompt in Bourne shell?
- $
- %
- #
- @
Show Answer
Answer : Option ( a )83. What is the default symbol for command prompt in C shell?
- $
- %
- #
- @
Show Answer
Answer : Option ( b )84. Which shell is the most common and best to use?
- Korn shell
- POSIX shell
- C shell
- Bash shell
Show Answer
Answer : Option ( d )85. What does the following command do? $ echo *
- Error
- Undefined behavior
- Displays “*”
- Lists all filenames in the current directory
Show Answer
Answer : Option ( d )86. Which symbol is used for assigning a value to variables?
- $
- &
- =
- @
Show Answer
Answer : Option ( c )87. A process is an instance of _______ program.
- waiting
- executing
- terminated
- halted
Show Answer
Answer : Option ( b )88. Each process is identified by a unique integer called ______
- PID
- PPID
- TID
- PTID
Show Answer
Answer : Option ( a )89. Which of the following command doesn’t create a process?
- pwd
- fork
- cd
- pwd and cd
Show Answer
Answer : Option ( d )90. Which command is used for locating repeated and non-repeated lines?
- sort
- uniq
- cut
- paste
Show Answer
Answer : Option ( b )91. Which option is used with uniq command for selecting non-repeated lines?
- -i
- -c
- -u
- -a
Show Answer
Answer : Option ( c )92. Which command is used for translating characters?
- sort
- trans
- tr
- paste
Show Answer
Answer : Option ( c )93. Which option is used with tr command for deleting characters?
- -d
- -c
- -n
- -a
Show Answer
Answer : Option ( a )94. Which one of the following command is used for searching for a pattern in one or more file(s)?
- cd
- cp
- paste
- grep
Show Answer
Answer : Option ( d )95. Which one of the following is the correct syntax for grep command?
- grep options filename(s)
- grep options pattern
- grep pattern filename
- grep options pattern filename(s)
Show Answer
Answer : Option ( d )96. grep command can be used for searching a pattern in more than one file.
- TRUE
- FALSE
Show Answer
Answer : Option ( a )97. What is a shell script?
- Group of commands
- A file containing special symbols
- A file containing a series of commands
- Group of functions
Show Answer
Answer : Option ( c )98. Shell scripts need to be saved with an extension .sh .
- TRUE
- FALSE
Show Answer
Answer : Option ( b )99. To run the script. we should make it executable first by using _____
- chmod +x
- chmod +r
- chmod +w
- chmod +rwx
Show Answer
Answer : Option ( a )100. Which of the following operators are used for logical execution?
- ||
- &&
- %%
- && and ||
Show Answer
Answer : Option ( d )101. Every if is closed with a corresponding ____
- else
- fi
- if
- else if
Show Answer
Answer : Option ( b )102. To check more than two conditions. ___ is used with if-else statements.
- while
- for
- elif
- for
Show Answer
Answer : Option ( c )103. Which of the following operators is used with test for comparison of numeric values?
- -eq
- -ne
- -gg
- –eq and -ne
Show Answer
Answer : Option ( d )104. ___ implies greater than and ____ implies less than.
- gt, le
- gt, lt
- ge,le
- ge,lt
Show Answer
Answer : Option ( b )105. Which one of the following option is used for AND operation in test command?
- -o
- -a
- -e
- -an
Show Answer
Answer : Option ( b )106. Which one of the following option is used for OR operation in test command?
- -o
- -a
- -e
- -an
Show Answer
Answer : Option ( a )107. Which command is used for computation and string handling?
- expr
- case
- if
- read
Show Answer
Answer : Option ( a )108. Which of the following keywords are used in while loop?
- do
- done
- then
- do and done
Show Answer
Answer : Option ( d )109. ____ statement matches an expression for more than one alternative.
- for
- while
- elif
- case
Show Answer
Answer : Option ( d )110. Which one of the following is used for looping with a list?
- while
- until
- case
- for
Show Answer
Answer : Option ( d )111. Which of the following loop statements uses do and done keyword?
- for
- while
- case
- for and while
Show Answer
Answer : Option ( d )112. The system administrator is also known as _____
- Master user
- Superuser
- Root user
- Master and Superuser
Show Answer
Answer : Option ( b )113. What is the login name of a system administrator?
- root
- su
- master
- admin
Show Answer
Answer : Option ( a )114. When we log in as root user we are placed in ____
- /bin
- /root
- /system
- /admin
Show Answer
Answer : Option ( b )115. Which of the following commands let us perform a set of instructions repeatedly
- for
- while
- until
- for, while, until
Show Answer
Answer : Option ( d )
Unix/Linux Operating System
May 05, 2022
0