Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu.Wang 2019-04-28 16:44:26 +08:00
commit fc99ed36fa
5 changed files with 296 additions and 294 deletions

View File

@ -0,0 +1,147 @@
[#]: collector: (lujun9972)
[#]: translator: (warmfrog)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-10790-1.html)
[#]: subject: (New Features Coming to Debian 10 Buster Release)
[#]: via: (https://itsfoss.com/new-features-coming-to-debian-10-buster-release/)
[#]: author: (Shirish https://itsfoss.com/author/shirish/)
即将到来的 Debian 10 Buster 发布版的新特点
=======================================
Debian 10 Buster 即将发布。第一个发布候选版已经发布,我们预期可以在几周内见到待最终版。
如果你期待对这个新的主要发布版本,让我告诉你里面有什么。
### Debian 10 Buster 发布计划
[Debian 10 Buster][1] 的发布日期并没有确定。为什么这样呢?不像其他分发版,[Debian][2] 并不基于时间发布。相反地它主要关注于修复<ruby>发布版重要 Bug<rt>release-critical bug</rt></ruby>。发布版重要 Bug 要么是严重的安全问题([CVE][3]),要么是一些其他阻止 Debian 发布的严重问题。
Debian 在它的软件归档中分为三个部分,叫做 Main、contrib 和 non-free。在这三者之中Debian 开发者和发布管理者最关心的包组成了该分发版的基石。Main 是像石头一样稳定的。因此他们要确保那里没有主要的功能或者安全问题。他们同样给予了不同的优先级,例如 Essential、Required、Important、Standard、Optional 和 Extra。更多关于此方面的知识参考后续的 Debian 文章。
这是必要的,因为 Debian 在很多环境中被用作服务器,人们已经变得依赖 Debian。他们同样看重升级周期是否有破环因此他们寻找人们来测试来查看当升级的时候是否有破坏并通知 Debian 有这样的问题。
这种提交方式带来的稳定性[是我喜欢 Debian 的众多原因之一][4]。
### Debian 10 Buster 版本的新内容
这里是即将到来的 Debian 主要发布版的一些视觉上和内部的改变。
#### 新的主题和壁纸
Buster 的 Debian 主题被称为 [FuturePrototype][5] 并且看起来如下图:
![Debian Buster FuturePrototype Theme][6]
#### 1、GNOME 桌面 3.30
Debian Stretch 版中的 GNOME 桌面在 Buster 中从 1.3.22 升级到了 1.3.30。在 GNOME 桌面发布版中新包含的一些包是 gnome-todo、tracker 替代了 tracker-gui、gstreamer1.0-packagekit 的依赖,因此可以通过自动地安装编码解码器来做播放电影之类的事。对于所有包来说一个大的改变是从 libgtk2+ 到 libgtk3+。
#### 2、Linux 内核 4.19.0-4
Debian 使用 LTS 内核版本,因此你可以期待更好的硬件支持和长达 5 年的维护和支持周期。我们已经从内核 4.9.0.3 到 4.19.0-4。
```
$ uname -r
4.19.0-4-amd64
```
#### 3、OpenJDK 11.0
Debian 在很长时间里都是 OpenJDK 8.0。现在在 Debian Buster 里我们已经升级为 OpenJDK 11.0,并且会有一个团队维护新的版本。
#### 4、默认启用 AppArmor
在 Debian Buster 中是默认启用 [AppArmor][7] 的。这是一个好事,谨慎是系统管理员必须采取的正确策略。这仅仅是第一步,并且可能需要修复很多对用户觉得有用的脚本。
#### 5、Nodejs 10.15.2
在很长一段时间里 Debian 在仓库中都只有 Nodejs 4.8。在这个周期里 Debian 已经移到 Nodejs 10.15.2。事实上Debian Buster 有很多 javascript 库例如 yarnpkg (一个 nmp 的替代品)等等。
当然,你可以从该项目仓库[在 Debian 中安装最新的 Nodejs][8],但是从 Debian 仓库中看到更新的版本是很棒的。
#### 6、NFtables 替代了 iptables
Debian Buster 提供了 nftables 来完整地替代了 iptables因为它有更好、更简单的语法更好的支持双栈 ipv4/v6 防火墙等等。
#### 7、支持更多的 ARM 64 和 ARMHF 的单板机。
Debian 已经支持一些常见的新的单板机,其中最新的包括 pine64_plus、ARM64 的 pinebook、Firefly-RK3288、ARMHF 64 的 u-boot-rockchip 以及 Odroid HC1/HC2 板、SolidRun Cubox-i 双核/四核1.5som)和 SolidRun Cubox-i 双核/四核1.5som+emmc板、Cubietruckplus 等。同样支持 Rock 64、Banana Pi M2 Berry、Pine A64 LTS Board、Olimex A64 Teres-1 与 Rapberry Pi 1、Zero 和 Pi 3。对于 RISC-V 系统同样支持开箱即用。
#### 8、Python 2 已死Python 3 长存
在 2020 年 1 月 1 日Python 2 将被 python.org 废弃。在 Debian 将所有的软件包从 Python 2.7 移到 Python 3 以后Python 2.7 将从软件仓库中移除。这可能发生在 Buster 发布版或者将来的某个发布版,这是肯定要来临的。因此 Python 开发者被鼓励移植他们的代码库来兼容 Python 3。在写本文的时候在 Debian Buster 中同时支持 python2 和 pythone3。
#### 9、Mailman 3
在 Debian 中终于可以使用 Mailman3 了。同时 [Mailman][10] 已经被细分成为组件。要安装整个软件栈,可以安装 mailman3-full 来获取所有组件。
#### 10、任意已有的 Postgresql 数据库将需要重新索引
由于 glibc 本地数据的更新,放入文本索引中的信息排序的方式将会改变,因为重新索引是有益的,这样在将来就不会有数据破坏发生。
#### 11、默认 Bash 5.0
你可能已经了解了 [Bash 5.0 的新特点][11],在 Debian 中已经是该版本了。
#### 12、Debian 实现 /usr/merge
我们已经分享过一个优秀的 freedesktop [读物][12],介绍了 `/usr/merge` 带来了什么。有一些事项需要注意。当 Debian 想要整个过渡时,可能由于未预见的情况,一些二进制文件可能并没有做这些改变。需要指出的一点是,`/var` 和 `/etc` 不会被触及,因此使用容器或者云技术的不需要考虑太多 :)。
#### 13、支持安全启动
在 Buster RC1 中Debian 现在支持<ruby>安全启动<rt>secure-boot</rt></ruby>。这意味着打开了安全启动设置的机器应该能够轻松安装 Debian。不再需要禁止或者处理安全启动的事 :)
#### 14、Debian-Live 镜像的 Calameres Live-installer
对于 Debian Buster 的 Live 版Debian 引入了 [Calameres 安装器][13]来替代老的 Debian-installer。Debian-installer 比 Calameres 功能更多但对于初学者Calameres 相对于 Debian-installer 提供了另外一种全新的安装方式。安装过程的截图:
![Calamares Partitioning Stage][14]
如图所见,在 Calamares 下安装 Debian 相当简单,只要经历 5 个步骤你就能在你的机器上安装 Debian。
### 下载 Debian 10 Live 镜像 (只用于测试)
现在还不要将它用于生产机器。可以在测试机上尝试或者一个虚拟机。
你可以从 Debian Live [目录][15]获取 Debian 64 位和 32 位的镜像。如果你想要 64 位的就进入 `64-bit` 目录,如果你想要 32 位的,就进入 `32-bit` 目录。
- [下载 Debian 10 Buster Live Images][15]
如果你从已存在的稳定版升级并且出现了一些问题,查看它是否在预安装的[升级报告][16]中提及了,使用 [reportbug][17] 报告你看到的问题。如果 bug 没有被报告,那么请尽可能地报告和分享更多地信息。
### 总结
当上千个包被升级时,看起来不可能一一列出。我已经列出了一些你在 Debian Buster 可以找到的一些主要的改变。你怎么看呢?
--------------------------------------------------------------------------------
via: https://itsfoss.com/new-features-coming-to-debian-10-buster-release/
作者:[Shirish][a]
选题:[lujun9972][b]
译者:[warmfrog](https://github.com/warmfrog)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/shirish/
[b]: https://github.com/lujun9972
[1]: https://wiki.debian.org/DebianBuster
[2]: https://www.debian.org/
[3]: https://en.wikipedia.org/wiki/Common_Vulnerabilities_and_Exposures
[4]: https://itsfoss.com/reasons-why-i-love-debian/
[5]: https://wiki.debian.org/DebianArt/Themes/futurePrototype
[6]: https://itsfoss.com/wp-content/uploads/2019/04/debian-buster-theme-800x450.png
[7]: https://wiki.debian.org/AppArmor
[8]: https://itsfoss.com/install-nodejs-ubuntu/
[9]: https://www.python.org/dev/peps/pep-0373/
[10]: https://www.list.org/
[11]: https://itsfoss.com/bash-5-release/
[12]: https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/
[13]: https://calamares.io/about/
[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/calamares-partitioning-wizard.jpg?fit=800%2C538&ssl=1
[15]: https://cdimage.debian.org/cdimage/weekly-live-builds/
[16]: https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=upgrade-reports;dist=unstable
[17]: https://itsfoss.com/bug-report-debian/

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (warmfrog)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,147 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Four Methods To Check The Default Gateway Or Router IP Address In Linux?)
[#]: via: (https://www.2daygeek.com/check-find-default-gateway-or-router-ip-address-in-linux/)
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
Four Methods To Check The Default Gateway Or Router IP Address In Linux?
======
Your default gateway is the IP address of your router that you should aware of that.
Typically this is automatically detected by your operating system during installation, if not then you may need to change it.
If your system not able to ping self then probable it could be a gateway issue and you have to fix it.
This might happen if you have multiple network adapters or routers on the network.
A gateway is a router that acts as an access point to passes network data from one networks to another networks.
The below articles will help you to gather some other information which is similar to this topic.
* **[9 Methods To Check Your Public IP Address In Linux Command Line][1]**
* **[How To Enable (UP) And Disable (DOWN) A Network Interface Port (NIC) In Linux?][2]**
This can be done using below Four commands.
* **`route Command:`** route command is used to show and manipulate the IP routing table.
* **`ip Command:`** IP command is similar to ifconfig, which is very familiar for assigning Static IP Address, Route & Default Gateway, etc.,.
* **`netstat Command:`** netstat (“network statistics”) is a command-line tool that displays network connections related information (both incoming and outgoing) such as routing tables, masquerade connections, multicast memberships and a number of network interface
* **`routel Command:`** routel command is used to list routes with pretty output format.
### 1) How To Check The Default Gateway Or Router IP Address In Linux Using route Command?
route command is used to show and manipulate the IP routing table.
Its primary use is to set up static routes to specific hosts or networks via an interface once the interface was configured.
When the add or del options are used, route modifies the routing tables. Without these options, route displays the current contents of the routing tables.
```
# route
or
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default www.routerlogin 0.0.0.0 UG 600 0 0 wlp8s0
192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp8s0
```
### 2) How To Check The Default Gateway Or Router IP Address In Linux Using ip Command?
**[IP command][3]** is similar to ifconfig, which is very familiar for assigning Static IP Address, Route & Default Gateway, etc.,.
ifconfig command was deprecated due to no maintenance since so many years, even though it is still available on most Linux distributions.
ifconfig command has been replaced by IP command which is very powerful and performing several network administration tasks with one command.
IP command utility bundled with iproute2 package. By default iproute2 utility pre-installed all the major Linux distribution.
If no, you can install it by issuing iproute2 on your terminal with help of package manager.
```
# ip r
or
# ip route
or
# ip route show
default via 192.168.1.1 dev wlp8s0 proto dhcp metric 600
192.168.1.0/24 dev wlp8s0 proto kernel scope link src 192.168.1.6 metric 600
```
### 3) How To Check The Default Gateway Or Router IP Address In Linux Using netstat Command?
netstat stands for Network Statistics, is a command-line tool that displays network connections related information (both incoming and outgoing) such as routing tables, masquerade connections, multicast memberships and a number of network interface.
It lists out all the tcp, udp socket connections and the unix socket connections.
It is used for diagnosing network problems in the network and to determine the amount of traffic on the network as a performance measurement.
```
# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default www.routerlogin 0.0.0.0 UG 0 0 0 wlp8s0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlp8s0
```
### 4) How To Check The Default Gateway Or Router IP Address In Linux Using routel Command?
It used to list routes with pretty output format. These programs are a set of helper scripts you can use instead of raw iproute2 commands.
The routel script will list routes in a format that some might consider easier to interpret then the ip route list equivalent.
The routef script does not take any arguments and will simply flush the routing table down the drain. Beware! This means deleting all routes which will make your network unusable!
```
# routel
target gateway source proto scope dev tbl
default 192.168.1.1 dhcp wlp8s0
192.168.1.0/ 24 192.168.1.6 kernel link wlp8s0
127.0.0.0 broadcast 127.0.0.1 kernel link lo local
127.0.0.0/ 8 local 127.0.0.1 kernel host lo local
127.0.0.1 local 127.0.0.1 kernel host lo local
127.255.255.255 broadcast 127.0.0.1 kernel link lo local
192.168.1.0 broadcast 192.168.1.6 kernel link wlp8s0 local
192.168.1.6 local 192.168.1.6 kernel host wlp8s0 local
192.168.1.255 broadcast 192.168.1.6 kernel link wlp8s0 local
::1 kernel lo
fe80::/ 64 kernel wlp8s0
::1 local kernel lo local
fe80::ad00:2f7e:d882:5add local kernel wlp8s0 local
ff00::/ 8 wlp8s0 local
```
If you would like to print only default gateway then use the following format.
```
# routel | grep default
default 192.168.1.1 dhcp wlp8s0
```
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/check-find-default-gateway-or-router-ip-address-in-linux/
作者:[Magesh Maruthamuthu][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.2daygeek.com/author/magesh/
[b]: https://github.com/lujun9972
[1]: https://www.2daygeek.com/check-find-server-public-ip-address-linux/
[2]: https://www.2daygeek.com/enable-disable-up-down-nic-network-interface-port-linux-using-ifconfig-ifdown-ifup-ip-nmcli-nmtui/
[3]: https://www.2daygeek.com/ip-command-configure-network-interface-usage-linux/

View File

@ -1,146 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (warmfrog)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (New Features Coming to Debian 10 Buster Release)
[#]: via: (https://itsfoss.com/new-features-coming-to-debian-10-buster-release/)
[#]: author: (Shirish https://itsfoss.com/author/shirish/)
Debian 10 Buster 发布即将到来的新特点
=======================================
Debian 10 Buster 即将发布。第一版发布日期已经确定,我们应该期待最终版,希望在几周内。
如果你对这个主要的新发布版本感到激动,让我告诉你里面有什么。
### Debian 10 Buster 发布计划
[Debian 10 Buster][1] 的发布日期并没有确定。为什么这样呢?不像其他分发版,[Debian][2] 不是基于时间的发布版。相反地它主要关注于修复 release-critical 的 Bug。Release-critical 的 bug 不是有严重安全问题就是一些其他组织 Debian 发布的严重问题。
Debian 在它的文档总分文三部分,叫做 Maincontrib和 non-free。在这三者之中Debian 开发者和发布管理者最关心的包组成了该分发版的基石。Main 是像石头一样稳定的。因此他们确保那里没有主要的基础或者安全问题。他们同样给了优先级的值例如 Essential RequiredImportanctStandardOptional 和 Extra。更多关于此方面的知识参考后续的 Debian 文章。
这是必要的,因为 Debian 在很多环境中被用作服务器,人们已经变得依赖 Debian。他们同样看重升级周期是否有破环因此他们寻找人们来测试来查看当升级的时候是否有破坏并通知 Debian 这样的问题。
这种提交方式带来的稳定性[是我喜欢 Debian 的众多原因之一][4]。
这里是在即将到来的主要的 Debian 发布版的少量的视觉上的改变和内部的改变。
#### 新的主题和壁纸
Buster 的 Debian 主题被称为 [FuturePrototype][5] 并且看起来如下图:
![Debian Buster FuturePrototype Theme][6]
#### 1\. GNOME 桌面 3.30
Debian Stretch 版中的 GNOME 桌面在 Buster 中从 1.3.22 升级到了 1.3.30。在 GNOME 桌面发布版中新包含的一些包是 gnome-todo, tracker 替代了 tracker-guigstreamer1.0-packagekit 的依赖,因此可以通过自动地编码解码器安装来做播放电影之类的事。对于所有包来说一个大的改变是从 libgtk2+ 到 libgtk3+。
#### 2\. Linux 内核 4.19.0-4
Debian 使用 LTS 内核版本因此你可以期待更好的硬件支持和长达5年的维持和 Debian 的支持周期。我们已经从内核 4.9.0.3 到 4.19.0-4。
```
$ uname -r
4.19.0-4-amd64
```
#### 3\. OpenJDK 11.0
Debian 在很长时间里都是 OpenJDK 8.0。现在在 Debian Buster 里我们已经升级为 OpenJDK 11.0 并且会有一个团队维护新的版本。
#### 4\. 默认地允许 AppArmor
在 Debian Buster 中 [AppArmor][7] 默认是允许地。这是一个好事,谨慎是系统管理员必须考虑的事来允许正确的策略。这仅仅是第一步并且可能需要修复很多对用户来说与预期一样有用的脚本。
#### 5\. Nodejs 10.15.2
在很长一段时间里 Debian 在仓库中都只有 Nodejs 4.8。这这个周期里 Debian 已经移到 Nodejs 10.15.2。事实上Debian Buster 有很多 javascript 库例如 yarnpkg (一个 nmp 的替代品)和很多其它的。
当然,你可以从项目仓库中[在 Debian 中安装最新的 Nodejs][8],但是从 Debian 仓库中看到更新的版本是很棒的。
#### 6\. NFtables 替代了 iptables
Debian Buster 提供了 nftables 作为 iptables 的完整替代,因为它有更好的更简单的语法,更好的支持双栈 ipv4-v6 防火墙并且还有更多。
#### 7\. 支持更多的 ARM 64 和 ARMHF 的单片机。
Debian 已经支持一些常见的新的单片机,在这些之间最新的是 pine64_plusARM64 的 pinebookFirefly-RK3288 ARMHF 64 的 u-boot-rockchip 和 Odroid
HC1/HC2 板SolidRun Cubox-i 双核/四核 1.5som),和 SolidRun Cubox-i 双核/四核 1.5som+emmcCubietruckplus。同样支持 Rock 64Banana Pi M2 BerryPine A64 LTS Board Olimex A64 Teres-1 与 Rapberry Pi 1Zero 和 Pi 3。对于 RISC-V 系统同样支持开箱即用。
#### 8\. Python 2 死了Python 3 长期存活
在 2020 年 1 月 1 日Python 2 将被 python.org 遗弃。在 Debian 将所有的软件包从 Python 2.7 移到 Python 3 以后Python 2.7 将从软件仓库中移除。这可能发生在 Buster 发布版或者将来的某个发布版,这是即将来临的。因此 Python 开发者被鼓励移植他们的代码库来兼容 Python 3。在写的时候在 Debian Buster 中同时支持 python2 和 pythone3。
#### 9\. Mailman 3
在 Debian 中最终可以获得 Mailman3。同时 [Mailman][10] 已经被细分成为组件。为了安装整个软件栈,安装 mailman3-full 来获取所有组件。
#### 10\. 任意已存在的 Postgresql 数据库将被重新索引
由于 glibc 本地数据的更新,放入文本索引中的信息排序的方式将会改变,因为重新索引是有益的,这样在将来就不会有数据破坏发生。
#### 11\. 默认的 Bash 5.0
你可能已经了解了 [Bash 5.0 的新特点][11],在 Debian 中已经是该版本了。
#### 12\. Debian 实现 /usr/merge
/user/merge 带来的一个优秀的自由桌面[初级读物][12]已经被分享了。有一些事项需要注意。当 Debian 想要做整个过度时,可能由于未预见的情况,一些文件可能并没有做这些改变。有一点需要注意的是,/var 和 /etc 将不被干涉,因此使用容器或者云的不需要考虑太多 :)。
#### 13\. 安全启动支持
在 Buster RC1 中Debian 现在支持安全启动。意味着有安全启动位并且打开的机器应该能够轻松安装 Debian。不再需要禁止或者处理安全启动的事 :)
#### \14. Debian-Live 镜像的 Calameres Live-installer
对于 Debian buster 来说Debian LiveDebian 引入了 [Calameres 安装器][13]来替代老的 debian-installer。当 Debian-安装器 比 Calameres 有更多特点时对于初学者Calameres 相对于 debian-installer 提供了可替换的一个全新的安装方式。安装国政的一些截图。
![Calamares Partitioning Stage][14]
如图所见,在 Calamares 下安装 Debian 相当简单,只要经历 5 步骤你就能在你的终端上安装 Debian。
### 下载 Debian 10 Live 镜像 (只用于测试)
现在还不要将它用于生产机器。在测试机上尝试或者一个虚拟机。
你可以获取 Debian 64-bit 和 32 位的镜像从 Debian Live [目录][15]。如果你想要 64-bit 的进入 64-bit 目录,如果你想要 32-bit 的,你可以进入 32-bit 目录。
[Debian 10 Buster Live Images][15]
如果你从已存在的稳定版升级并且一些东西被破坏,查看它是否在[升级报告][16]中报道,使用预安装的包 [reportbug][17] 报告你看到的问题。如果 bug 没有在包中被报道,那么请尽可能地报告和分享更多地信息。
**总结**
当上千个包被升级时,在视觉上是不可能全部列出的。我已经列出了一些你在 Debian buster 可以找到的一些主要的改变。你怎么看呢?
--------------------------------------------------------------------------------
via: https://itsfoss.com/new-features-coming-to-debian-10-buster-release/
作者:[Shirish][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/shirish/
[b]: https://github.com/lujun9972
[1]: https://wiki.debian.org/DebianBuster
[2]: https://www.debian.org/
[3]: https://en.wikipedia.org/wiki/Common_Vulnerabilities_and_Exposures
[4]: https://itsfoss.com/reasons-why-i-love-debian/
[5]: https://wiki.debian.org/DebianArt/Themes/futurePrototype
[6]: https://itsfoss.com/wp-content/uploads/2019/04/debian-buster-theme-800x450.png
[7]: https://wiki.debian.org/AppArmor
[8]: https://itsfoss.com/install-nodejs-ubuntu/
[9]: https://www.python.org/dev/peps/pep-0373/
[10]: https://www.list.org/
[11]: https://itsfoss.com/bash-5-release/
[12]: https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/
[13]: https://calamares.io/about/
[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/calamares-partitioning-wizard.jpg?fit=800%2C538&ssl=1
[15]: https://cdimage.debian.org/cdimage/weekly-live-builds/
[16]: https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=upgrade-reports;dist=unstable
[17]: https://itsfoss.com/bug-report-debian/

View File

@ -0,0 +1,148 @@
[#]: collector: (lujun9972)
[#]: translator: (warmfrog)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Four Methods To Check The Default Gateway Or Router IP Address In Linux?)
[#]: via: (https://www.2daygeek.com/check-find-default-gateway-or-router-ip-address-in-linux/)
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
在 Linux 中检查默认网关或者路由 IP 地址的四个方法?
==============================================
你应该意识到你的默认网关是你的路由器的 IP 地址。
典型地这是在安装过程中由操作系统自动检测的,如果没有,你可能需要改变它。
如果你的系统不能 ping 自身,那么很可能是一个网关问题,你必须修复它。
在网络中,当你有多个网络适配器或路由器时,这种情况可能会发生。
一个网关是一个路由器扮演着一个入口点角色,从一个网络传递网络数据到另一个网络。
下面是一些可能帮助你收集到的与该话题相似的一些信息。
* **[9 Methods To Check Your Public IP Address In Linux Command Line][1]**
* **[How To Enable (UP) And Disable (DOWN) A Network Interface Port (NIC) In Linux?][2]**
这可以通过下面的四个命令完成。
* **`route 命令`** route 命令被用来显示和操作 IP 路由表。
* **`ip 命令:`** IP 命令类似于 ifconfig 非常熟悉赋值静态 IP 地址,路由 & 默认网关,等等。
* **`netstat 命令`** netstat “network statistics”是一个命令行工具来显示网络连接相关的信息包括入口和出口的例如路由表伪装连接多播成员和很多网络接口。
* **`routel 命令`** routel 命令被用来以好看的输出格式列出路由。
### 1在 Linux 中如何使用 route 命令检查默认的网关或者路由 IP 地址?
route 命令被用来显示和操作 IP 路由表。
它主要用于通过一个已经配置的接口给特定的主机或者网络设置静态的路由。
当 add 或者 del 选项被使用时route 修改路由表。没有这些选项route 显示路由表的当前内容。
```
# route
or
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default www.routerlogin 0.0.0.0 UG 600 0 0 wlp8s0
192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp8s0
```
### 2如何在 Linux 中使用 ip 命令检查默认网关或者路由 IP 地址?
**[IP 命令][3]** 相似于 ifconfig非常熟悉配置静态 IP 地址,路由 & 默认网关,等等。
ifconfig 命令因为多年没有维持被遗弃了,即使它仍然在大多数 Linux 分发版上可获得。
ifconfig 命令已经被 IP 命令替代了IP 命令是非常强大的,只要一个命令就能执行几个网络管理任务。
IP 命令工具附带在 iproute2 包中。默认 iproute2 预安装在主要的 Linux 分发版中。
如果没有,你可以在你的终端中在包管理器的帮助下通过输入 iproute2 并安装它。
```
# ip r
or
# ip route
or
# ip route show
default via 192.168.1.1 dev wlp8s0 proto dhcp metric 600
192.168.1.0/24 dev wlp8s0 proto kernel scope link src 192.168.1.6 metric 600
```
### 3如何在 Linux 中使用 netstat 命令检查默认网关或者路由 IP 地址?
netstat 代表 Network Statistics是一个命令行工具来显示网络连接相关的信息包括入口和出口的例如路由表伪装连接多播成员和很多网络接口。
它列出所有的 tcp udp 套接字连接和 unix 套接字连接。
它在网络中被用来诊断网络问题并判断网络中的交通总量来作为性能测量指标。
```
# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default www.routerlogin 0.0.0.0 UG 0 0 0 wlp8s0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlp8s0
```
### 4如何在 Linux 中使用 routel 命令检查默认网关或者路由 IP 地址?
它用来以好看的输出格式列出路由信息。这些程序是一系列你可以用来替代 iproute2 的帮助脚本。
routel 脚本以一种被认为更容易解释并且等价于 route 输出列表的格式来输出路由信息。
如果 routef 脚本不加任何参数,将仅仅简单的将路由表清空。小心!这意味着删除所有的路由,让你的网络不再可用。
```
# routel
target gateway source proto scope dev tbl
default 192.168.1.1 dhcp wlp8s0
192.168.1.0/ 24 192.168.1.6 kernel link wlp8s0
127.0.0.0 broadcast 127.0.0.1 kernel link lo local
127.0.0.0/ 8 local 127.0.0.1 kernel host lo local
127.0.0.1 local 127.0.0.1 kernel host lo local
127.255.255.255 broadcast 127.0.0.1 kernel link lo local
192.168.1.0 broadcast 192.168.1.6 kernel link wlp8s0 local
192.168.1.6 local 192.168.1.6 kernel host wlp8s0 local
192.168.1.255 broadcast 192.168.1.6 kernel link wlp8s0 local
::1 kernel lo
fe80::/ 64 kernel wlp8s0
::1 local kernel lo local
fe80::ad00:2f7e:d882:5add local kernel wlp8s0 local
ff00::/ 8 wlp8s0 local
```
如果你只想打印默认的网关那么使用下面的格式。
```
# routel | grep default
default 192.168.1.1 dhcp wlp8s0
```
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/check-find-default-gateway-or-router-ip-address-in-linux/
作者:[Magesh Maruthamuthu][a]
选题:[lujun9972][b]
译者:[warmfrog](https://github.com/warmfrog)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.2daygeek.com/author/magesh/
[b]: https://github.com/lujun9972
[1]: https://www.2daygeek.com/check-find-server-public-ip-address-linux/
[2]: https://www.2daygeek.com/enable-disable-up-down-nic-network-interface-port-linux-using-ifconfig-ifdown-ifup-ip-nmcli-nmtui/
[3]: https://www.2daygeek.com/ip-command-configure-network-interface-usage-linux/