Find study materials for any course. Check these out:
Browse by school
Make your own
To login with Google, please enable popups
To login with Google, please enable popups
Don’t have an account?
To signup with Google, please enable popups
To signup with Google, please enable popups
Sign up withor
When a computer first powers up, it reads instructions from firmware, which initiates a series of self-checks and further actions to be taken. One of these actions is to load and execute code form the computer's hard disk or other storage hardware...
The default runlevel is set by the id line in the /etc/inittab file. (This file is often absent on Upstart-based systems, but Upstart honors this one /etc/inittab line, if it's present.) You can change runlevels temporarily by passing the runlevel number to telinit or init, as in telinit 3 to change to runlevel 3.
Explain how to change what services run in a given runlevel on a SysV system.
Scripts (or, more commonly, links to scripts) in /etc/rc.d/rc?.c; /etc/init.d/rc?.d; .etc.rc?.d, or a similar location, where ? is a runlevel number, determine what services are started or stopped in any given runlevel. Scripts in these directories should be renamed to start with K to stop them in the runlevel or to start with S to start them. Tools such as update-rc.d and chkconfig can help simplify this task.
Provide an overview of the process of installing software from source code.
Source code programs must be downloaded (usually in the form of a tarball) and extracted. Most programs provide a configure script, although some require no configuration or must be configured in some other way. Typing make typically compiles the software, and typing make config as root installs it. There is enough variability that reading the program's documentation prior to configuring it is advisable.
Describe important directories for locally compiled software.
The /usr/src directory tree is the usual location for source code that has been or is being compiled and installed on the system, with each package having its own directory, such as /usr/src/ samba-3.5.4 for Samba version 3.5.4. Working files and copies of the binaries may be held here, too, although such files are often removed to save space after the software is installed. The binaries are usually stored in the /usr/local directory; this directory holds functional subdirectories, such a /usr/local/bin for binaries and /usr/local/lib for libraries
Summarize tools used to communicate with users.
The /etc/issue and /etc/issue.net files contain text that's shown to local and remote text-mode users, respectively, as part of the login prompt, while /etc/motd holds a message that's shown after a successful text-mode login. The shutdown command includes an option to pass a message to users explaining an impending system shutdown, and wall enables you to send similar messages even if the system isn't about to be shut down.
Where might you find runlevel-specific symbolic links to SysV startup scripts?
/etc/init.d/rc?.d; and /etc/rc?.d. both specify directories where runlevel-specific symbolic links to SysV startup scripts may reside (the ? is a stand-in for runlevel number), depending on the distribution in use
You want to compile software from source code and install it in the /opt directory tree (an unusual location). The source code includes a configure script. How might you run this script to achieve this goal?
./configure --prefix=/opt. The --prefix option to configure a script usually sets the base of the installation directory tree. In this example, binary files will probably go in /opt/bin, libraries on /opt/lib and so on.
You want to check the configuration of a server called waiter on a Fedora system, to see in which runlevels it runs. What might you type to do this?
chkconfig --list waiter. The chkconfig command displays information on or modifies the status of services started by SysV startup scripts. The --list option displays the status of a service by the specified name.
You’ve taken over administration of a Fedora Linux system that’s been running for more than a
year. You discover that the dostuff program was installed from source code and resides in
/usr/local/bin and related directories. You want to uninstall this program and install a newer
version from a precompiled binary package. Where is the best location for you to look for the
original source code directory so you can use its uninstall feature?
A subdirectory of /usr/src, probably /usr/src/dostuff or a related name. Source code that's compiled locally is traditionally extracted to /usr/src, into a subdirectory named after the package to be installed, although there's no guarantee that the relevant directory will be found-it's possible the previous administrator deleted the files or used a non-standard location to compile them.
What is the most common sequence for installing software from source code?
Unpack tarball; type ./configure ; type make ; type make install as root, is a correct, if simplified, description of how to install many source code packages.
What is the first program the Linux kernel runs once the kernel itself is running, assuming a normal Linux startup procedure
innit. By default, the kernel launches the /sbin/init program as its first process. This program handles the rest of the system startup process, including launching SysV or Upstart startup scripts.
The following line is present in a Linux computer's /etc/inittab file. What can you say about it?
The computer boots into runlevel 3. The id line in /etc/innitab specifies the default runlevel, which in this example is 3. Although runlevel 3 is a text-mode-only runlevel on Red Hat and related distributions, this isn't true of all distributions; Debian, Ubuntu, Gentoo, and others control the startup of X in ways other than by the default renlevel.
How can you boot Linux directly into single-user mode?
In GRUB, select the kernel image you want to boot, press E, and add 1 or single to the kernel or linux line
How can you enter GRUB’s interactive recovery mode?
Press the C key at the GRUB main menu.
Once you’ve located the original source code directory for a program (dostuff) that was previously compiled and installed locally, what is a common and effective way to uninstall the software?
Type make uninstall as root in the original source directory. Many programs have an uninstall target to make, meaning that if you do as suggested, the software will be uninstalled. This action isn't guaranteed to work, but it is a common approach, as the question suggests.
A source package’s Makefile does not include an install target to make. You type make to create a binary file called theprog. How might you install the software, assuming you care only about installing this one program? (Choose all that apply.)
cp theprog /usr/local/bin
install theprog /usr/local/bin
Select the misbehaving kernel entry in GRUB, press the E key and edit the kernels name.
In what file is the system's initial runlevel specified on a SysV system?
/etc/inittab specifies the inital runlevel on its id line.
An administrator of a Debian system types the following command as root. What will be the effect, assuming that the appropriate software is installed?
update-rc.d enable disable 23
The enable service will be disabled in runlevels 2 and 3. The update-rc.d utility affects the runlevels in which services run. It takes a service name, and action, and a runlevel or list of runlevels as arguments. Thus, enable is a service name, albeit a confusing one, and disable is a command to disable the service. This command is applied to runlevels 2 and 3.
What file would you edit to add an unusual operating system to a GRUB 2 boot menu?
Use of /etc/grub.d/40_custom is encouraged to add custom GRUB configurations for locally compiled kernels or unusual OSs. After making such a change, you should type update-grub to update the GRUB runtime configuration file, /boot/grub/grub.cfg
What might you find in the /etc/init.d directory?
SysV startup scripts. The /etc/innit.d directory holds SysV startup scripts on many Linux systems. Upstart startup scripts reside in /etc/init or /etc/event.d
What might you reasonably use as a default runlevel?
2, 3, 4, and 5 are all reasonable default runlevels, because they all correspond to working multi-user modes. Debian and related distributions generally use runlevel 2 as a default, and runlevels 3 and 5 are generally used as defaults without and with X running, respectively, on Red Hat and related distributions.
You want to compile and install a program from source code on a Debian system. You've located
the program's home page, where several files are listed in the download section. What is the source
code tarball most likely to be named?
programname-#.#.#.tgz where programname stands for the name of the program and #.#.# stands for the version number. Tarballs are files archived with tar and, frequently, compressed with gzip or bzip2. They usually have filenames that end in .tgz, .tar.gz, .tbz, .tbz2, or .tar.bz2. Although the filename doesn't contain a hint that it contain source code, this is not uncommon for Unix and Linux source tarballs.
A source package's Makefile does not include an install target to make. You type make to create a
binary file called theprog. How might you install the software, assuming you care only about
installing this one program?
cp theprog /usr/local/bin or install theprog /usr/local/bin. The cp command will install the software, thus satisfying the question; however. the ownership and permissions on the program file may not be optimal. The install program changes ownership and permissions as the file is copied, so it is a superior answer to the question-but both options are correct.
You want to deliver a message to would-be Telnet users that your system is for official use by
employees of your company. What file would you edit to deliver this message before Telnet users
see a login: prompt?
/ect/issue.net. This file contains text that's sent by the Telnet server to the remote Telnet client prior to Telnet's sending the login: prompt-Precisely what the question requires.
In reviewing files in /etc, you find that /etc/motd is completely empty. What does this mean?
The system won't display a message of the day after users log in. The /etc/motd file holds the message of the day, which is displayed after users log in using text-mode tools such as text-mode consoles or SSH. Ah empty /etc/motd file simply means that no such message will appear
Sign up for free and study better.
Get started today!