配置源
-
apt源
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
但是我发现,Ubuntu18.04下粘贴上文,会导致安装软件失败,提示unmet缺少依赖,即使
-f
也不行。
apt源备份 /ect/apt/sources.list
嵌入式apt源:
https://mirrors.ustc.edu.cn/ubuntu-ports/
termux源:
deb https://mirrors.ustc.edu.cn/termux stable main
:%s/xxxx/mirrors.uest.edu.cn/g
vim命令
%s/htt.*.*com/http:\/\/mirrors.ustc.edu.cn/g
看了20分钟sed文档后sudo bash -c "cp /etc/apt/sources.list /etc/apt/sources.list-bak && sed -e s/'htt.*.*com'/'http:\/\/mirrors.ustc.edu.cn'/g /etc/apt/sources.list-bak > /etc/apt/sources.list"
sudo bash -c "cp /etc/apt/sources.list /etc/apt/sources.list-bak && sed -e s/'htt.*.*com'/'http:\/\/mirrors.ustc.edu.cn'/g /etc/apt/sources.list-bak > /etc/apt/sources.list"; echo " sudo apt-get update; sudo apt-get install python-pip -y; sudo apt-get install axel -y; sudo pip install speedtest-cli; sudo apt-get install htop; sudo apt-get install python3-pip -y; # sudo apt-get install openjdk-7-jdk -y; sudo apt install openjdk-8-jdk-headless -y; sudo snap install --classic code; # https://code.visualstudio.com/docs/setup/linux sudo apt-get install tinyproxy -y; #看图神器 sudo apt-get install caca-utils -y; sudo apt-get install lrzsz -y; sudo apt-get install nmap -y; sudo apt-get install whois -y; sudo apt-get install iftop -y; sudo apt-get install reptyr -y; # wps https://www.wps.cn/product/wpslinux # mysql: apt install mysql-server-8.0 sudo apt install git -y; " > to_install && chmod 777 to_install && bash to_install
-
Maven源:
<mirrors> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors>
-
pip源
修改 ~/.config/pip/pip.conf这个是过时的! $HOME/.pip/pip.conf (Linux), %APPDATA%\pip\pip.ini (Windows 10)
为
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
pip源备份 备份? 备什么份,把自定义的删了即可
采用清华pip源官网的写法:
临时使用pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
长期使用pip install pip -U pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
原来的源差到连pip都无法更新???
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U
-
Docker
中科大sudo vim /etc/docker/daemon.json
{
"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"]
}
sudo systemctl restart docker
然后敲入docker info
看最下面Registry Mirrors来确定修改成功。
OS config
- 更新man手册
apt-get install manpages-de manpages-de-dev manpages-dev glibc-doc manpages-posix-dev manpages-posix
-
wget --no-check-certificate https://github.com/teddysun/across/raw/master/unixbench.sh
-
系统是否支持无线网卡(不需要其他驱动)
https://help.ubuntu.com/stable/ubuntu-help/net-wireless-troubleshooting-hardware-check.html
https://help.ubuntu.com/community/WifiDocs/WirelessCardsSupported
如果不支持,就是看不见无线网络,用手机USB线做有线热点,幸运的话,那里面的‘附加驱动’里就有你的无线网卡驱动。
Ubuntu apt不能安装E:无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系
出现原因:1.软件安装过程中强制中断,而后改变了安装源 2.软件和更新中的源和apt-get中的源相互独立? 解决办法:恢复原本的源,在“软件更新”中勾选所有的选项,静待更新完成,最好不要中途中止。 -
锁定内核更新 https://connectwww.com/how-to-prevent-ubuntu-kernel-update-disable-or-stop-linux-kernel-update
sudo apt-mark holduname -r
or
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
or
echo package-name hold" | sudo dpkg --set-selections
-
禁止一些服务,
systemctl disable
是不足够的systemctl list-units --type service --state running
to show and using argdisable
disable not persistent, usemask/unmask
how-to-stop-snapd-from-auto-updating
systemctl mask tinyproxy.service;
systemctl mask docker;
systemctl mask snapd.service;
Software config
- snap bin目录配置
echo "export PATH=$PATH:/snap/bin" >> ~/.bashrc
source ~/.bashrc
snap 阻止自动更新 snap refresh --hold - 装机必备:
indicator-sysmonitor
搜狗拼音输入法,按照搜狗的指引操作即可:https://shurufa.sogou.com/linux/guide - FireFox 字体放大:
layout.css.devPixelsPerPx
- 缩短cd命令找不到时的等待时间
~/.bashrc
文件unset command_not_found_handle
SF