Linux Essentials Certificate Exam, version 1.6 v1.0 (010-160)

Page:    1 / 6   
Total 80 questions

What is the purpose of the PATH environment variable?

  • A. It allows the execution of commands without the need to know the location of the executable.
  • B. It increases security by preventing commands from running in certain locations.
  • C. It specifies the location of a user's home directory.
  • D. It indicates the location of the default shell to be used when a user logs in.
  • E. It contains the absolute path to the current directory.


Answer : A

Which of the following commands sets the variable USERNAME to the value bob?

  • A. set USERNAME bob
  • B. $USERNAME==bob
  • C. var USERNAME=bob
  • D. USERNAME<=bob
  • E. USERNAME=bob


Answer : E

FILL BLANK -
What command displays manual pages? (Specify ONLY the command without any path or parameters.)



Answer : man

Which command copies the contents of the directory /etc/, including all sub-directories, to /root/?

  • A. copy /etc /root
  • B. cp -r /etc/* /root
  • C. cp -v /etc/* /root
  • D. rcp /etc/* /root
  • E. cp -R /etc/*.* /root


Answer : B

Which of the following commands puts the lines of the file data.csv into alphabetical order?

  • A. a..z data.csv
  • B. sort data.csv
  • C. abc data.csv
  • D. wc -s data.csv
  • E. grep --sort data.csv


Answer : B

Which of the following examples shows the general structure of a for loop in a shell script?

  • A. for *.txt as file => echo $file
  • B. for *.txt ( echo $i )
  • C. for file in *.txt do echo $i done
  • D. for ls *.txt exec {} \;
  • E. foreach @{file} { echo $i }


Answer : C

Which operator in a regular expression matches the preceding character either zero or one time?

  • A. ?
  • B. *
  • C. +
  • D. %
  • E. $


Answer : A

The file script.sh in the current directory contains the following content:
#!/bin/bash
echo $MYVAR
The following commands are used to execute this script:

MYVAR=value -
./script.sh
The result is an empty line instead of the content of the variable MYVAR. How should MYVAR be set in order to make script.sh display the content of MYVAR?

  • A. !MYVAR=value
  • B. env MYVAR=value
  • C. MYVAR=value
  • D. $MYVAR=value
  • E. export MYVAR=value


Answer : E

What is the return value of a shell script after successful execution?

  • A. 1
  • B. 0
  • C. -1
  • D. -255
  • E. 255


Answer : B

Which of the following commands creates the ZIP archive poems.zip containing all files in the current directory whose names end in .txt?

  • A. zip *.txt > poems.zip
  • B. zcat *.txt poems.zip
  • C. zip poems.zip *.txt
  • D. zip cfz poems.zip *.txt
  • E. cat *.txt | zip poems.zip


Answer : C

Which of the following statements are true regarding a typical shell script? (Choose two.)

  • A. It has the executable permission bit set.
  • B. It starts with the two character sequence #!.
  • C. It is located in /usr/local/scripts/.
  • D. It is located in /etc/bash/scripts/.
  • E. It is compiled into a binary file compatible with the current machine architecture.


Answer : AE

Which of the following commands extracts the contents of the compressed archive file1.tar.gz?

  • A. tar -czf file1.tar.gz
  • B. ztar file1.tar.gz
  • C. tar -xzf file1.tar.gz
  • D. tar --extract file1.tar.gz
  • E. detar file1.tar.gz


Answer : C

Which of the following commands finds all lines in the file operating-systems.txt which contain the term linux, regardless of the case?

  • A. igrep linux operating-systems.txt
  • B. less -i linux operating-systems.txt
  • C. grep -i linux operating-systems.txt
  • D. cut linux operating-systems.txt
  • E. cut [Ll] [Ii] [Nn] [Uu] [Xx] operating-systems.txt


Answer : C

Which one of the following statements concerning Linux passwords is true?

  • A. All passwords can be decrypted using the system administrator's master password.
  • B. Passwords may never start with a non-letter.
  • C. Users cannot change their password once it has been set.
  • D. Passwords are only stored in hashed form.
  • E. Passwords may be at most six characters long.


Answer : D

Which of the following programs are web servers? (Choose two.)

  • A. Apache HTTPD
  • B. Postfix
  • C. Curl
  • D. Dovecot
  • E. NGINX


Answer : AE

Page:    1 / 6   
Total 80 questions