Docsity

LPI Linux Essentials Exam Questions, Exams of Computer Science

Toggle sidebar
bg1
LPI LINUX ESSENTIALS EXAM QUESTIONS
If you wanted to disable a second network interference in Linux what command would
you enter at the shell? - Answers -ifdown eth1
You have been editing a configuration file using vi. You realize that you've made many
mistakes and need to quit without saving the changes so that you can start over. Which
command will allow you to do this? - Answers -:q! Or Q bang
What directory would the ~ character represent? - Answers -The home directory of the
currently logged in user.
What is the default shell for most Linux distributions - Answers -Bash
You need to troubleshoot a hardware issue. Which command would let you view the
kernel ring buffer to see what hardware was just added? - Answers -dmesg | less (driver
message)
Which of the following sections give a brief review of the syntax used for a particular
command or utility within a man page? - Answers -SYNOPSIS
In which directory could you add files so that a newly created user will automatically
have them when they first log in? - Answers -/etc/skel
Which of the following provides binary files containing prewritten code elements or
interfaces that programmers can call when writing Linux programs? - Answers -Libraries
You are running a ping command to see if a particular host is set up. How would you
specify to the ping command that only five packets get sent to the remote host? -
Answers -ping -c 5 host.example.com
You need to verify that a remote host with a hostname of dns2.linuxacademy.com is up
and running. Which of the following commands would you enter at the shell prompt to
do this? - Answers -ping dns2.linuxacademy.com
While using vi to edit a file in command mode, you try to use the BACKSPACE key to
delete a word, but nothing happens. What's wrong? - Answers -You have to switch to
insert mode.
Which command would uncompress the contents in the file 'important.bz2' - Answers -
bunzip2
How would you add a new user account to a system? - Answers -useradd newguy
Which software development model is considered to be less structured than the others?
- Answers -Bazaar
pf3
pf4
pf5

Partial preview of the text

Download LPI Linux Essentials Exam Questions and more Exams Computer Science in PDF only on Docsity!

LPI LINUX ESSENTIALS EXAM QUESTIONS

If you wanted to disable a second network interference in Linux what command would you enter at the shell? - Answers -ifdown eth You have been editing a configuration file using vi. You realize that you've made many mistakes and need to quit without saving the changes so that you can start over. Which command will allow you to do this? - Answers -:q! Or Q bang What directory would the ~ character represent? - Answers -The home directory of the currently logged in user. What is the default shell for most Linux distributions - Answers -Bash You need to troubleshoot a hardware issue. Which command would let you view the kernel ring buffer to see what hardware was just added? - Answers -dmesg | less (driver message) Which of the following sections give a brief review of the syntax used for a particular command or utility within a man page? - Answers -SYNOPSIS In which directory could you add files so that a newly created user will automatically have them when they first log in? - Answers -/etc/skel Which of the following provides binary files containing prewritten code elements or interfaces that programmers can call when writing Linux programs? - Answers -Libraries You are running a ping command to see if a particular host is set up. How would you specify to the ping command that only five packets get sent to the remote host? - Answers -ping -c 5 host.example.com You need to verify that a remote host with a hostname of dns2.linuxacademy.com is up and running. Which of the following commands would you enter at the shell prompt to do this? - Answers -ping dns2.linuxacademy.com While using vi to edit a file in command mode, you try to use the BACKSPACE key to delete a word, but nothing happens. What's wrong? - Answers -You have to switch to insert mode. Which command would uncompress the contents in the file 'important.bz2' - Answers - bunzip How would you add a new user account to a system? - Answers -useradd newguy Which software development model is considered to be less structured than the others?

  • Answers -Bazaar

You need to search for man that relate to the Postfix service. Which command will do this? - Answers -apropos postfix and man -k postix (Must be root) Which directory contains filesystem management utilities such as cp or mv? - Answers -/bin and /usr/bin What utility can we use to find manual pages? - Answers -Man What file might we look at to view our most recently entered shell commands? - Answers -~/.bash_history What command will bring a list of all running processes on our system? - Answers -Top Which of the following commands would you use to view a default gateway address on your system? - Answers -Route and netstat -r Which commands would you run to see who is currently logged into the system? - Answers -W and who If we wanted to learn about all the available options for the cd command, how might we display its manual page? - Answers -Man cd You have a project where you have to build an email server for your organization of around 200 employees. You are thinking of using a linux system to accomplish this. Would it be possible to achieve this? - Answers -Yes. Linux can be configured to provide email services. We need to find a file named la.txt in our current directory. Which command would we use? - Answers -find ./-name la.txt Which file contains the encrypted passwords for the users on a system? - Answers -/etc/shadow You're using vi to edit a text file in insert mode. You have discovered that you need to replace a large part of a single line of code. The best way to do this is to change from insert mode into replace mode. Given that you are always in insert mode, which steps would you take to enter into replace mode. - Answers -First hit the ESC key, then the shift + R keys. Which command in a script would display the text "hello world" to the screen, followed by a new line? - Answers -Echo "hello world" Which file(s) are used for DNS resolution? - Answers -/etc/hosts and /etc/resolv.conf An application has the following permissions set on it:

What is the syntax to change the group ownership on file - Answers -chgrp group file.txt While currently reading any man page, how might we quit and go back to the shell? - Answers -Q You have just added a second network interface to your linux system. If you first NIC is aliased as eth0. What is the most likely value of your newly-added NIC alias? - Answers -eth Which command would sent the output of the 'who' command to a text file? - Answers - who > who.txt You need to search for man pages that relate to the Samba daemon. Which command will do this? - Answers -apropos smbd and man -k smbd Which section of a man page contains utilities used by the root user? - Answers - You need to move a directory (dir1) along with all of its contents, to a new location (dir2). Which command would accomplish this task? - Answers -mv ~/dir1 ~/dir You need to delete the //APP directory within your users home directory. Given that it has child folders and files in it, which is the best command to do this? - Answers -rm -rf ~/APP Which command would copy all files ending in .pdf to the Documents directory? - Answers -cp *.pdf Documents/ Which of the following are actually roles of the Linux system? - Answers -To preserve data integrity, being able to locate data easily From your current location on the file system, how would you change to three directories above the current directory? - Answers -cd ../../.. What environmental variable might we use to specify the directory where man page files will be located? - Answers -MANPATH What linux server applications can you configure in order to provide network database services? - Answers -MySQL, Microsoft SQL Server When it comes to bash configuration files, which of the following will be read/executed when logging into a shell that is considered to be a non-login shell? - Answers - ~/.bashrc (every time whenever a user opens a new shell) In which directory will you find system-related configuration files? - Answers -/etc Which software movement is against proprietary software - Answers -FSF

Which of the files below will configure the path to the man page's files? - Answers -/etc/man_db.conf You've downloaded an application package that has an extension of .rpm. What is required to install it on your Linux system? - Answers -Red Hat Package Management System What commands will tell us what our IP address is on our linux system? - Answers -ip addr show and ifconfig Which of the following shell commands will load the ssh client and command as the 'stephen' user to an ssh server with an IP address of 172.16.10.123? - Answers -ssh [email protected] and ssh -l stephen 172.16.10. You are in charge of installing a new Linux server. The linux server will be used to host a high load production database application that will be used by a large number of users. Which might be the best linux distribution to choose for this mission-critical application server, with consideration for out-of-box configuration? - Answers -SUSE Linux Enterprise Server and Red Hat Enterprise Server You have a single computer on your network that can not connect to a networked printer. Of the following, what should be a troubleshooting step that you would perform?

  • Answers -Run the ping command to the IP of the printer to see if it responds How might we find out what directory paths are currently set up on our Linux file system? - Answers -env, echo $PATH What utility allows us to switch users, including switching to the root user? - Answers - su What should the first line of a bash shell script contain? - Answers -#!/bin/bash As you are editing a file in vi, you find a word that needs to be deleted. You place your cursor at the beginning of that word. What command will delete this word without deleting the space that follows after our word? - Answers -de As a developer, your supervisor wants you to download the source code for the latest Linux kernel and then modify it to support a custom application that your organization is developing in-house. Given the current kernel open source licensing is this possible to do? - Answers -Yes, you can create a new Linux flavor and even redistribute it as long as the source code will remain freely available You have just copied an executable file called pinehead.sh from our company's sever to your ~/Downloads directory. You have changed to the ~/Downloads directory at your shell prompt. When you entered pinehead.sh as a command in the prompt, the shell