如何在终端连接有线以太网?

发布于 2025-01-25 04:00:51 字数 322 浏览 5 评论 0 原文

众所周知,我们可以通过这种方式连接有线以太网。但是,当没有Ubuntu桌面GUI时,我找不到连接或断开有线以太网的方法。

此外,我正在使用校园网络。这意味着我要做的是单击“关闭”或“打开”,而我不必输入宽带帐户和密码。

因此,是否有任何终端命令可以意识到“关闭”或“打开”的单击?

Normal way

As we all know, we can connect wired Ethernet by this way. When there is no Ubuntu desktop GUI, however, i have found no way to connect or disconnect that wired Ethernet.

Moreover, i am using campus network. That means what should i do is click "Turn Off" or "Turn On",and i don't have to enter a broadband account and password.

So are there any terminal commands can realize the clicking of "Turn Off" or "Turn On" ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

疯狂的代价 2025-02-01 04:00:51

是的,您可以使用IFCONFIG命令,

假设这是您的唯一端口,那么它将具有ETH0的标签,

这意味着命令

sudo ifconfig eth0 down 

向下开关端口,如果我想将其打开,请在命令上打开命令是

 sudo ifconfig eth0 up

方便的指南,用于某些Linux终端命令与IfConfig https://www.tecmint.com/ifconfig-config-command-examples/#:text=the %20“下降”%20or%20“如果Down,为%20in%20AN%20inactive%20State

Yes you can but using the ifconfig command

Assuming that this is your only port then it will have the tag of eth0

Which will mean the command is

sudo ifconfig eth0 down 

Down switches the port off, if I want to turn it on the command is

 sudo ifconfig eth0 up

Handy guide for some Linux Terminal commands to do with ifconfig https://www.tecmint.com/ifconfig-command-examples/#:~:text=The%20“down”%20or%20“ifdown,is%20in%20an%20inactive%20state.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文