网卡配置
root@u1804s:~# cat /etc/netplan/50-cloud-init.yaml # This file is generated from information provided by # the datasource. Changes to it will not persist across an instance. # To disable cloud-init's network configuration capabilities, write a file # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled} network: ethernets: ens33: addresses: [192.168.188.158/24] gateway4: 192.168.188.2 dhcp4: true optional: true version: 2
sudo netplan apply
使用国内源
root@u1804s:~# cat ~/.pip/pip.conf
[global]
index-url = http://pypi.douban.com/simple
[install]
trusted-host=pypi.douban.com
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
本文介绍了在Ubuntu系统中如何配置网卡,并展示了具体的配置文件内容。此外,还提供了使用国内源的方法,包括设置pip的配置文件来指定国内的Python包索引。
1846

被折叠的 条评论
为什么被折叠?



