Use correct syntax markup for shell

Approved by:	carlavilla
This commit is contained in:
Li-Wen Hsu 2021-03-14 20:08:55 +08:00
parent 55c95407aa
commit a9a9e66105
No known key found for this signature in database
GPG key ID: 8D7BCC7D012FD37E
666 changed files with 17924 additions and 17924 deletions

View file

@ -67,7 +67,7 @@ A complete list of all available ports and packages can be found https://www.fre
Packages are pre-compiled applications, the FreeBSD equivalents of [.filename]#.deb# files on Debian/Ubuntu based systems and [.filename]#.rpm# files on Red Hat/Fedora based systems. Packages are installed using `pkg`. For example, the following command installs Apache 2.4:
[source,bash]
[source,shell]
....
# pkg install apache24
....
@ -83,7 +83,7 @@ The Ports Collection, sometimes referred to as the ports tree, can be installed
To compile a port, change to the port's directory and start the build process. The following example installs Apache 2.4 from the Ports Collection:
[source,bash]
[source,shell]
....
# cd /usr/ports/www/apache24
# make install clean
@ -91,7 +91,7 @@ To compile a port, change to the port's directory and start the build process. T
A benefit of using ports to install software is the ability to customize the installation options. This example specifies that the mod_ldap module should also be installed:
[source,bash]
[source,shell]
....
# cd /usr/ports/www/apache24
# make WITH_LDAP="YES" install clean
@ -123,7 +123,7 @@ apache24_flags="-DSSL"
Once a service has been enabled in [.filename]#/etc/rc.conf#, it can be started without rebooting the system:
[source,bash]
[source,shell]
....
# service sshd start
# service apache24 start
@ -131,7 +131,7 @@ Once a service has been enabled in [.filename]#/etc/rc.conf#, it can be started
If a service has not been enabled, it can be started from the command line using `onestart`:
[source,bash]
[source,shell]
....
# service sshd onestart
....
@ -141,7 +141,7 @@ If a service has not been enabled, it can be started from the command line using
Instead of a generic _ethX_ identifier that Linux(R) uses to identify a network interface, FreeBSD uses the driver name followed by a number. The following output from man:ifconfig[8] shows two Intel(R) Pro 1000 network interfaces ([.filename]#em0# and [.filename]#em1#):
[source,bash]
[source,shell]
....
% ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
@ -240,7 +240,7 @@ In some Linux(R) distributions, one could look at [.filename]#/proc/sys/net/ipv4
For example, use the following to determine if IP forwarding is enabled on a FreeBSD system:
[source,bash]
[source,shell]
....
% sysctl net.inet.ip.forwarding
net.inet.ip.forwarding: 0
@ -248,14 +248,14 @@ net.inet.ip.forwarding: 0
Use `-a` to list all the system settings:
[source,bash]
[source,shell]
....
% sysctl -a | more
....
If an application requires procfs, add the following entry to [.filename]#/etc/fstab#:
[source,bash]
[source,shell]
....
proc /proc procfs rw,noauto 0 0
....
@ -264,7 +264,7 @@ Including `noauto` will prevent [.filename]#/proc# from being automatically moun
To mount the file system without rebooting:
[source,bash]
[source,shell]
....
# mount /proc
....