COMP 266 Lecture Notes - Lecture 2: Freebsd, Bourne Shell

14 views1 pages
1. Read the main page for the shutdown command.
a. How do you shut down the system to a single-user mode? Try it and present
results.
Ans: The default behaviour of shutdown is to drop into single-user mode. It must be
accompanied by the halt -h, poweroff -p or reboot -r options.
b. What’s difference between single-user mode and how the system normally
runs?
Ans: Single-user-mode boots into a Bourne shell prompt, and gives full local access to
the system and its configuration files. Where as multi-user mode, root access is required.
Additionally, single-user mode boots without network interface.
In general, singer-user mode is used to repair systems that will not boot due to
inconsistent file system, reset root password when it is unknown.
References:
https://www.freebsd.org/doc/handbook/boot-introduction.html
c. Explain options in the command “shutdown -t 100 +3 -h”.
Ans: FreeBSD’s shutdown has no -t option. But for Debian systems, the -t 100 would
shutdown in 100 minutes, and the -h implies a halt
d. How do you boot into single-user mode?
Ans: Either select the option at startup (FreeBSD provides a menu), or boot -s
e. What, if anything, do you notice that is different about booting into single-
user mode compared to shutting down to single-user mode?
Ans: Not much is apparently different, except instead of the user’s home directory :~/, it
boots into #. There is no $PATH environment variable linking to the programs in /bin. In
order to list directories, or perform general commands, the /bin/ls was issued.
f. Shut the system down; then boot it normally. Look in the file
/var/log/messages (often /var/adm/messages on some systems). How does the
information in the “messages” file compare with what appears on the screen
during boot?
Ans: The information in the /var/log/messages file when cat’d appears to be the same as
what was presented during the boot screen.
References:
https://www.freebsd.org/cgi/man.cgi?shutdown(8)
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows half of the first page of the document.
Unlock all 1 pages and 3 million more documents.

Already have an account? Log in

Document Summary

Ans: the default behaviour of shutdown is to drop into single-user mode. Ans: single-user-mode boots into a bourne shell prompt, and gives full local access to the system and its configuration files. Where as multi-user mode, root access is required. In general, singer-user mode is used to repair systems that will not boot due to inconsistent file system, reset root password when it is unknown. References: https://www. freebsd. org/doc/handbook/boot-introduction. html: explain options in the command shutdown -t 100 +3 -h . Ans: not much is apparently different, except instead of the user"s home directory :~/, it boots into #. There is no environment variable linking to the programs in /bin. In order to list directories, or perform general commands, the /bin/ls was issued: shut the system down; then boot it normally. Ans: the information in the /var/log/messages file when cat"d appears to be the same as what was presented during the boot screen.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents