Linux Operating System Online MCQ Test

Linux Operating System Online MCQ Test

1.Which type of information display an absolute path name?
(A) file’s location with reference ✔️
(B) file’s location with detail
(C) file’s location with area
(D) file’s location with account

2.In absolute path name, directory names are separated by____.
(A) \
(B) |
(C) #
(D) / ✔️

3.Which command used to display the current working directory?
(A) pswd
(B) pword
(C) pwd ✔️
(D) passvvd

4.Mkdir command can be followed with the names of the directories to be____.
(A) modify
(B) edited
(C) group
(D) created ✔️

5.Directories in Linux can be created using ___command.
(A) make
(B) mkdir ✔️
(C) makedir
(D) mdir

6.Which command can be used to create a directory named naresh ?
(A) mkdir naresh ✔️
(B) mk naresh
(C) dir naresh
(D) md naresh

7.Which command used to change directory?
(A) cd ✔️
(B) cd ..
(C) change
(D) cdir

8.To create multiple directory named naresh, tanisi, dhatri, which command can be used?
(A) md naresh tanisi dhatri
(B) mk naresh tanisi dhatri
(C) mkdir naresh tanisi dhatri ✔️
(D) dir nareshtanisi dhatri

9.Which command used to comeback to previous directory?
(A) change
(B) cdir
(C) cd
(D) cd .. ✔️

10.If your current working directory is home/data/naresh/dhatri and to change it to home directory, which command used ?
(A) cd ..
(B) cd ../../
(C) cd ../../../ ✔️
(D) cd ../../../../

11.In cd .. command, double dot (..) stands for the ___directory.
(A) child
(B) parent ✔️
(C) base
(D) main

12.Which command used for change directory to /home/username/Desktop, from any current path ?
(A) cd ~/Desktop ✔️
(B) cd /Desktop
(C) cd */Desktop
(D) cd &/Desktop

13.Which command is used to change directory to the root directory from any current path?
(A) cd / ✔️
(B) cd
(C) cd –
(D) cd ..

14.Which symbol refer to home directory of the user?
(A) * ✔️
(B) /
(C) ~ ✔️
(D) &

15.Which command is used to change directory to the home directory from any current path?
(A) cd/
(B) cd ✔️
(C) cd –
(D) cd ..

16.An empty directory can be deleted by using the command____.
(A) rmdir ✔️
(B) rm
(C) delete
(D) remove all

17.Which command is used to change directory to the previously changed directory?
(A) cd/
(B) cd
(C) cd – ✔️
(D) cd ..

18.To delete a non-empty directory with all its contents we can use the___command.
(A) rmdir
(B) rm –all
(C) rm –r ✔️
(D) rm -d

19.Linux can practically consist of any ASCII character except the _____character.
(A) Backslash
(B) Null
(C) Both A and B ✔️
(D) None of these

20.In Linux, a file name can consist of up to ____characters.
(A) 64
(B) 102
(C) 144
(D) 255

21.What is the full form of ASCII?
(A) American standard Code for information interchange ✔️
(B) American standard Course for information interchange
(C) American standard Code for interchange information
(D) American standard Code for international information

22._____is the valid file names in Linux.
(A) .file1 & file2.
(B) ^file^-++ & -{} ()
(C) test$# & ab.cd.ef
(D) All of these ✔️

23.______types of character are permitted for file name.
(A) Any control character
(B) Non-printable character
(C) Both A and B ✔️
(D) none of these

24.Which character recommended for file name?
(A) Alphabetic character
(B) Numerals & period (.)
(C) Hyphen (-) & underscore (_)
(D) All of these ✔️

25.Which command used to display the contents of a small file on the terminal?
(A) cat ✔️
(B) cal
(C) cel
(D) can

26.Linux is ____case sensitive.
(A) incorrectly
(B) wrongly
(C) strictly ✔️
(D) inexactly

27.What is the use of cat command?
(A) Create a file
(B) concatenate two files
(C) appending contents to a file
(D) All of these ✔️

28.Which command used to create a file named nms ?
(A) cal > nms
(B) cet > nms
(C) can> nms
(D) cat > nms ✔️

29.In Linux, which key indicates the end of file character?
(A) Ctrl + c
(B) Ctrl+ d ✔️
(C) Ctrl + x
(D) Ctrl + a

30.In Linux, cat > naresh command, > symbol is known as ____operator.
(A) redirection
(B) relational ✔️
(C) logical
(D) parameter

31.Which command used to create file3 that contains the text of both the files namely file1 and file2 ?
(A) cat file1 file2>file3 ✔️
(B) cat file1 file2 file3
(C) cat > file1 file2 file3
(D) cat file1> file2 file3

32.Which command used to append content in an existing file ?
(A) cal >> nms
(B) cet >> nms
(C) can >> nms
(D) cat >> nms ✔️

33.The _____command is used to delete/remove one or more files.
(A) rm ✔️
(B) rmdir
(C) delete
(D) remove

34.Which command used to append content in an existing file?
(A) cal >> nms
(B) cet >> nms
(C) can >> nms
(D) cat >> nms ✔️

35.Which command will be used to delete files test1, test2, test3?
(A) rm test1 test2 test3 ✔️
(B) rm test1, test2, test3
(C) m test1 test2 test3
(D) m test1, test2, test3

36.Which command will be used to delete all the files from the current directory?
(A) rm ?
(B) rm ?* ✔️
(C) rm [*1
(D) rm * ✔️

37.Which command will be used to delete all the three files test1, test2, test3 as argument?
(A) rm test ?
(B) rm test* ✔️
(C) rm [test]
(D) rm [test1-test3]


38.Which command is used to delete file using interactive mode and the user will be asked to verify the delete operation?
(A) rm –i filename ✔️
(B) rm –r filename
(C) rm –r *
(D) rm -rf

39.Which command is used to delete all contents within the current directory?
(A) rm –i filename
(B) rm –r filename
(C) rm –r *
(D) rm –rf

40.Which command is used to delete directory and along with all its contents?
(A) rm –i filename
(B) rm –r dirname ✔️
(C) rm –r *
(D) rm –rf *

41.Which command is used to deletes the contents even if it is write protected?
(A) rm –i filename
(B) rm –r filename
(C) rm –r *
(D) rm –rf * ✔️

42.The ____command gives us the list of the contents in the current or a specified directory.
(A) rm
(B) ls ✔️
(C) dir
(D) list

43._____symbol is treated as hidden file.
(A) . ✔️
(B) ..
(C) /
(D) *

44._____is a wildcard character.
(A) * ✔️
(B) /
(C) –
(D) %

45. _____command used to create hidden file.
(A) cat > ✔️
(B) .intro
(C) cat>intro
(D) cat>*intro

46.Which command is use to lists the files that are in user’s home directory?
(A) ls ~ ✔️
(B) ls [svics]*
(C) ls [n-s][5-7]??
(D) ls –r

47._____entries are automatically created in the directory whenever the directory is created.
(A) 4
(B) 3
(C) 2(. and ..) ✔️
(D) 6

48.Which command is use to lists all the files in which the first character of the filename matches with any of the given alphabets within the square brackets the remaining part of file name can contain any valid ASCII character?
(A) ls ~
(B) ls [svics]* ✔️
(C) ls [n-s][5-7]??
(D) ls -r

49.Which command is use to list the files by sorting them in reverse order?
(A) ls ~
(B) ls [svics]*
(C) ls [n-s][5-7]??
(D) ls –r ✔️

50.Which command is use to lists all file with 4 character filename with the condition that the first character is in the range n to s, second character is in the range of 5 to 7, whereas the third and fourth characters are any valid ASCII character?
(A) ls ~
(B) ls [svics]*
(C) ls [n-s][5-7]?? ✔️
(D) ls -r