Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
如何在命令行中重启有线网络?
Experiences and Insight
3778
views ·
5
replies ·
To
floor
Go
wenlin
deepin
2017-01-06 00:16
Author
ifconfig xxx down / ifconfig xxx up;service network restart可以重启网卡,但如果控制中心中没启用的话也不起作用。
如何直接在命令行中操纵控制中心?
Reply
Like 0
Favorite
View the author
All Replies
jingle
deepin
2017-01-06 05:27
#1
这个我反馈上去看下。
Reply
Like 0
View the author
A·S·M·X·T 😏😜
deepin
2017-01-06 05:35
#2
ip link set xxx down / up可以不?
Reply
Like 0
View the author
MeowSprite
deepin
2017-01-06 17:41
#3
ifconfig是直接操作网卡了,比较底层了。而控制中心使用的是networkmanager来管理网络的。
想重启网络比较简单的方式:
1. 直接重启networkmanager服务
sudo service network-manager restart
Copy the Code
2. 通过nmcli来控制networkmanager,其实就是相当于命令行操作控制中心,这个命令不需要sudo
nmcli n off
nmcli n on
Copy the Code
上面是直接开启关闭整体网络,也可以通过指定网络连接来连接或断开,比如你就想断开有线网络。
nmcli c show
nmcli c down [网络名称]
nmcli c up [网络名称]
Copy the Code
网络名称比如有线网应该是有线连接啊之类的,通过第一条命令可以查看到。
Reply
Like 0
View the author
wenlin
deepin
2017-01-09 20:52
#4
谢谢
Reply
Like 0
View the author
lengfeng910
deepin
2021-05-11 05:42
#5
控制中心禁用了有线网卡,上面的命令就都没用了,那么又该使用哪个命令来“启用网络”呢?
Reply
Like 0
View the author
Please
sign
in first
Featured Collection
Change
Nuntia - Modern IMAP/SMTP mail client for Deepin (Beta tester wanted!)
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Ranking
Change
Adding a Dancing Spectrum Bar to the Deepin Taskbar | deepin-spectrum
Popular Events
More
如何直接在命令行中操纵控制中心?