wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Linux-2 Quiz 2 -- LAMP

Total questions: 15

Worksheet time: 9mins

Name
Class
Date
1.

Default Apache stores its html pages in:

a)

/etc/www

b)

/var/www

c)

/apache/www

d)

/var/www/html

2.

The default configuration file of Apache on Debian-based Linux distributions is?

a)

etc/apache2/apache2.conf

b)

/etc/httpd.conf

c)

var/apache/apache.conf

d)

var/htpd.conf

3.

On which port does Apache run by default?

a)

443

b)

80

c)

8080

d)

22

4.

How to use more commands in a single line on the command-prompt?

a)

Seperate them with the ‘|’

b)

Seperate them with the ‘:’

c)

Seperate them with the ‘;’

d)

Seperate them with the ‘/’

5.

What will happen if the command ‘touch /fake 2> /tmp/error.msg’ is issued under user root, assuming that the file ‘fake’ does not exist?

a)

You will get an error indicating the file cannot be written tot he the location /tmp

b)

You will get a ‘file not found error’ on your screen’

c)

You will get an error indicating the file cannot be written to the the location /tmp

d)

You will get an empty file in ‘/tmp’ called ‘error.msg’

6.

What is true about SSH-CONNECT ?

a)

The SSH-CONNECT protocol manages server authentication, privacy and data integrity

b)

The SSH-CONNECT protocol runs on the transport layer and authenticates the client’s credentials to the server

c)

The SSH-CONNECT connection protocol runs above the user authentication protocol to multiplex the single encrypted channel into multiple logical channels

d)

SSH-CONNECT connection manages both server authentication and user authentication

7.

How can you check the current SSH daemon version installed on your Ubuntu/Debian Linux system?

a)

sshd --version

b)

rpm -ihv ssh

c)

ssh -V

d)

yum -check ssh

8.

Open-SSH provides programs such as:

a)

sshd

b)

ssh

c)

scp

d)

sftp

9.

Whats is the correct syntax for creating a backup (export) of a mysql-database?

a)

mysql -u -p databasename > dbsample.sql

b)

mysqldump -u -p databasename > dbsample.sql

c)

mysql -u -p databasename < dbsample.sql

d)

mysqldump -u -p databasename < dbsample.sql

10.

What is defined in the file ‘~/.ssh/authorized_keys’

a)

DSA and RSA private key of the user

b)

List of servers, along with host keys accessed by the user

c)

List of authorized public keys for servers, verified by the server to authenticate the user when login is attempted

d)

RSA private key of the user, verified by the server to authenticate the user when login is attempted

11.

What is the correct syntax for a secure copy command, to copy the file "foobar.txt" from the local host to a remote host?

a)

scp foobar.txt your_username@remotehost.edu:/some/remote/directory

b)

scp your_username@remotehost.edu:/some/remote/directory foobar.txt

c)

scp foobar.txt remotehost.edu:/some/remote/directory -u your_username

d)

scp -u your_username@remotehost.edu:/some/remote/directory foobar.txt

12.

The correct command in Linux to restart the ssh daemon is:

a)

systemctl ssh restart

b)

sshd restart now

c)

sudo service restart sshd

d)

sudo systemctl restart sshd

13.

The command to create an SSH private and public keys is:

a)

ssh-keygen

b)

ssh-copy-id –i /home/bob/.ssh/id_rsa REMOTESERVER

c)

pubpriv

d)

ssh -c

14.

How to disable the root user to login in a linux server running SSH?

a)

Open the file ‘ /etc/ssh/sshd_config ‘ and change the parameter ‘PermitRootLogin yes’ to ‘PermitRootLogin no’ and restart the ssh service.

b)

Open the file ‘ /var/log/sshd_config ‘ and change the parameter ‘PermitRootLogin yes’ to ‘PermitRootLogin no’ and restart the ssh service

c)

Open the file ‘ /var/log/auth.log ‘ and delete the parameter ‘PermitRootLogin and restart the server

d)

Do nothing; The Root user can never login using SSH

15.

What is the correct Linux command to stop the 'mysql-server' (assuming it is installed) when working under Root?

a)

mysql stop

b)

stop service mysql

c)

systemctl stop mysql.service

d)

service stop mysql