aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergio Carlavilla Delgado <carlavilla@FreeBSD.org>2023-07-13 11:02:04 +0000
committerSergio Carlavilla Delgado <carlavilla@FreeBSD.org>2023-07-13 11:02:04 +0000
commitbb920e6c2c674c98bc8090cb19d5580ba842716f (patch)
tree9fe5c2cf98ca451ea43d2f248d9b69deb0894bc4
parent019993dd43ff2c538b440924c2db2c670e665d7d (diff)
downloaddoc-bb920e6c2c.tar.gz
doc-bb920e6c2c.zip
Improve some shell syntax highlighting in basics chapter
PR: 269243 Submitted by: CiarĂ¡n Ainsworth <ciaranainsworth@gmail.com> Sponsored by: Daifressh
-rw-r--r--documentation/content/en/books/handbook/basics/_index.adoc78
1 files changed, 76 insertions, 2 deletions
diff --git a/documentation/content/en/books/handbook/basics/_index.adoc b/documentation/content/en/books/handbook/basics/_index.adoc
index 1950c1cdba..db51642d18 100644
--- a/documentation/content/en/books/handbook/basics/_index.adoc
+++ b/documentation/content/en/books/handbook/basics/_index.adoc
@@ -74,7 +74,7 @@ After reading this chapter, you will know:
Unless FreeBSD has been configured to automatically start a graphical environment during startup, the system will boot into a command line login prompt, as seen in this example:
-[source,shell]
+[.programlisting]
....
FreeBSD/amd64 (pc3.example.org) (ttyv0)
@@ -393,6 +393,12 @@ When finished, the utility will prompt to either create another user or to exit.
[source,shell]
....
# adduser
+....
+
+The output should be similar to the following:
+
+[.programlisting]
+....
Username: jru
Full name: J. Random User
Uid (Leave empty for default):
@@ -458,6 +464,13 @@ By default, an interactive mode is used, as shown in the following example.
[source,shell]
....
# rmuser jru
+
+....
+
+The output should be similar to the following:
+
+[.programlisting]
+....
Matching password entry:
jru:*:1001:1001::0:0:J. Random User:/home/jru:/usr/local/bin/zsh
Is this the entry you wish to remove? y
@@ -490,7 +503,14 @@ This is shown in <<users-modifying-chpass-ru>>.
====
[source,shell]
....
-#Changing user database information for jru.
+# chpass
+....
+
+The output should be similar to the following:
+
+[.programlisting]
+....
+# Changing user database information for jru.
Login: jru
Password: *
Uid [#]: 1001
@@ -543,6 +563,12 @@ To prevent accidental or unauthorized changes, this command will prompt for the
[source,shell]
....
% passwd
+....
+
+The output should be similar to the following:
+
+[.programlisting]
+....
Changing local password for jru.
Old password:
New password:
@@ -562,6 +588,12 @@ This allows the password to be changed when a user cannot remember the original
[source,shell]
....
# passwd jru
+....
+
+The output should be similar to the following:
+
+[.programlisting]
+....
Changing local password for jru.
New password:
Retype new password:
@@ -610,6 +642,12 @@ Care must be taken when using the operator group, as unintended superuser-like a
....
# pw groupadd teamtwo
# pw groupshow teamtwo
+....
+
+The output should be similar to the following:
+
+[.programlisting]
+....
teamtwo:*:1100:
....
====
@@ -625,6 +663,12 @@ This command will add `jru` as a member of `teamtwo`.
....
# pw groupmod teamtwo -M jru
# pw groupshow teamtwo
+....
+
+The output should be similar to the following:
+
+[.programlisting]
+....
teamtwo:*:1100:jru
....
====
@@ -641,6 +685,12 @@ When man:pw[8] is used to add a user to a group, it only manipulates `/etc/group
....
# pw groupmod teamtwo -m db
# pw groupshow teamtwo
+....
+
+The output should be similar to the following:
+
+[.programlisting]
+....
teamtwo:*:1100:jru,db
....
====
@@ -654,6 +704,12 @@ Unlike the previous example, these users are appended to the group and do not re
[source,shell]
....
% id jru
+....
+
+The output should be similar to the following:
+
+[.programlisting]
+....
uid=1001(jru) gid=1001(jru) groups=1001(jru), 1100(teamtwo)
....
====
@@ -726,6 +782,12 @@ For example, `ls -l` in an arbitrary directory may show:
[source,shell]
....
% ls -l
+....
+
+The output should be similar to the following:
+
+[.programlisting]
+....
total 530
-rw-r--r-- 1 root wheel 512 Sep 5 12:31 myfile
-rw-r--r-- 1 root wheel 512 Sep 5 12:31 otherfile
@@ -1490,6 +1552,12 @@ For example:
[source,shell]
....
% ps
+....
+
+The output should be similar to the following:
+
+[.programlisting]
+....
PID TT STAT TIME COMMAND
8203 0 Ss 0:00.59 /bin/csh
8895 0 R+ 0:00.00 ps
@@ -1512,6 +1580,12 @@ The output from man:top[1] is similar:
[source,shell]
....
% top
+....
+
+The output should be similar to the following:
+
+[.programlisting]
+....
last pid: 9609; load averages: 0.56, 0.45, 0.36 up 0+00:20:03 10:21:46
107 processes: 2 running, 104 sleeping, 1 zombie
CPU: 6.2% user, 0.1% nice, 8.2% system, 0.4% interrupt, 85.1% idle