FreeBSD is a UNIX branch. Most of its commands come from it.
If you switch from UNIX to BSD, you must be familiar with its commands.
1: man online query man ls
2: ls viewing directories and archives LS-la
3: ln creates the link file ln-fs/usr/local/Apache/etc/httpd. conf/etc/httpd. conf
4: The more file name is displayed on the page.
5: CD/usr/local/Apache switch directory
6: Create a new directory named mkdir/usr/temp.
7: rmdir Delete directory rmdir/usr/temp
8: Rm Delete directory or file Rm-F file name (if you want to delete directory, add-R)
9: CP copy directory or archive CP source archive target Archive
10: Pwd displays the current working directory
11: change the name of the MV directory or file or move the target file of the MV source file
12: find directory or file find/etc-name file name
13 fetch FTP get file fetch ftp://ftp.center.kl.edu.tw/pub/FreeBSD/test.tgz
14. chmod: Change the archive permission. chmod-r 755/usr/local/etc
15 chown changed the archive owner chown-r Lin. Wheel/usr/local/etc
16 fsck repair File System fsck-y
17. gzip/tar: Compressed or decompressed files or directories tar-czvf: compressed file name .tar.gz directory name
18 mount the file system or device Mount/CDROM
19 umount unload the file system or the umount/CDROM Device
20 DF query system available archive DF
21 du: disk space occupied by the display directory or file Du-a quota name (Du-SH can be used to obtain the disk space in the current folder)
22 ps Query System Process status PS-Aux | grep Apach *
23 Kill A process kill PID
24 su change identity Su-Root
25 adduser
26 rmuser delete user
27 vipw edit user account
28 passwd Change Password
29 Ping detection machine online status Ping 210.240.6.9
30 ifconfig network interface settings and Management ifconfig-
31 route you can set the routing table
32 traceroute: list the route traceroute 210.240.8.1
33. netstat can be used to query network usage and online conditions.
34 pkg_add install package pkg_add bash-2.04.tgz
35 pkg_delete remove Installed Package pkg_delete bash-2.04
36 pkg_info query installation records
37 sync forces the system to write the cached data back to the hard disk
38 reboot restart the system
39 halt shut down the system
40 shutdown: notifies the user that the system will be shut down
41 init 0 direct Shutdown
Chown-r owner. group file or directory
-R: The owner and group of all files under the table directory will change.
Chmod
Drwxrwxrwx
LR-rwxr-x
1 2 3 4
D: Table directory
R: Table read
W: Table write
X: The table is executable.
-: Disable the table function.
L: Table linked files
2: Permission to read the file or directory owner
3: Read Permission for the same group of the file or directory owner
4: read permissions of people on the network
-R: the permission to read all files in the table directory is changed.
Gzip/tar
Tar czvf compressed file name .tar.gz directory name
Z: gzip Compression
C: Create a new compression File
V: adopts the verbose mode to watch the compression process.
F: Force
Tar zxvf compressed file name .tar.gz
Z: Decompress with Gzip
X: Extract
V: adopts the verbose mode to watch the compression process.
F: Force
Ifconfig
Query all network interfaces
Ifconfig-
Set Network Interface Parameters
Ifconfig de0 192.168.1.10 netmask 255.255.255.0
Stop Network Interface
Ifconfig de0 down
Start Network Interface
Ifconfig de0 up
Route
Gateway for changing routing path
Route change default 192.168.1.254
Netstat
Query a routing table
Netstat-Rn
Query network interface traffic statistics
Netstat-I
Query TCP network connection conditions
Netstat-T
Query all online network conditions
Netstat-
Shutdown
How long will the user be notified of shutdown? The administrator needs reboot or halt
Shutdown-K Time Message
How long will the user be notified to restart the system?
Shutdown-r time message
How long will it take to notify the user to shut down the system?
Shutdown-h Time Message
Time: Now or + 3 tables three minutes later or yymmddhhmm
Message: enclosed in double quotation marks or prefixed with A-sign
Some common other combined commands:
Shift + G is the same as the end key under Win, so that the cursor is at the end of the document.
:/The function is to search for text in a document.
: Find: This is a file search.