1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-20 22:17:09 +08:00

Update 后端程序员必备的Linux基础知识.md

添加net-tools 和 iproute2
This commit is contained in:
幻境云图 2019-01-31 10:04:23 +08:00 committed by GitHub
parent e5b16ea4a0
commit 8fc8f50b8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -337,6 +337,8 @@ passwd命令用于设置用户的认证信息包括用户密码、密码过
- 查看当前系统的网卡信息ifconfig - 查看当前系统的网卡信息ifconfig
- 查看与某台机器的连接情况ping - 查看与某台机器的连接情况ping
- 查看当前系统的端口使用netstat -an - 查看当前系统的端口使用netstat -an
- **net-tools 和 iproute2 **
`net-tools`起源于BSD的TCP/IP工具箱后来成为老版本Linux内核中配置网络功能的工具。但自2001年起Linux社区已经对其停止维护。同时一些Linux发行版比如Arch Linux和CentOS/RHEL 7则已经完全抛弃了net-tools只支持`iproute2`。linux ip命令类似于ifconfig但功能更强大旨在替代它。更多详情请阅读[如何在Linux中使用IP命令和示例](https://linoxide.com/linux-command/use-ip-command-linux)
- **`shutdown`** `shutdown -h now` 指定现在立即关机;`shutdown +5 "System will shutdown after 5 minutes"`:指定5分钟后关机同时送出警告信息给登入用户。 - **`shutdown`** `shutdown -h now` 指定现在立即关机;`shutdown +5 "System will shutdown after 5 minutes"`:指定5分钟后关机同时送出警告信息给登入用户。
- **`reboot`** **`reboot`** 重开机。**`reboot -w`** 做个重开机的模拟(只有纪录并不会真的重开机)。 - **`reboot`** **`reboot`** 重开机。**`reboot -w`** 做个重开机的模拟(只有纪录并不会真的重开机)。