1.删除一些没有用的软件:sudo apt-get remove libreoffice-common
2.备份apt源:sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
3.更新apt源 sudo vim /etc/apt/sources.list
- 将文档改为:
#aliyun
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
#中科大
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
#清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
4.更新源:sudo apt-get update
- 令会扫描每一个软件源服务器,并为该服务器所具有软件包资源建立索引文件,存放在本地的/var/lib/apt/lists/目录中,这样以后用apt命令会快,如用apt-get install xx时
- apt-get的命令
5.每次sudo都需要输入密码,sudo vim /etc/sudoers
- 找到sudo一行,在下面添加
你的用户名 ALL=(ALL:ALL) NOPASSWD:ALL
- 如果sudo报错了 用
pkexec vi /etc/sudo
修改文件
6.安装搜狗:vim /etc/apt/sources.list.d/ubuntukylin.list
文件,加入ubuntu kylin的apt源:deb http://archive.ubuntukylin.com:10006/ubuntukylin trusty main
- 接着
sudo apt-get update
提示缺少公钥xxxxxx sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D259B7555E1D3C58
导入公钥再sudo apt-get update
即可- 执行
sudo apt-get install sogoupinyin
提示缺少依赖,却什么补什么 sudo apt-get install fcitx fcitx-libs-qt
- 放弃了,去官网下了sogoupinyin_2.2.0.0108_amd64.deb。
- 进入目录:
sudo dpkg -i sogoupinyin_2.2.0.0108_amd64.deb
- 修复一下:
sudo apt install -f
- 再次安装:
sudo dpkg -i sogoupinyin_2.2.0.0108_amd64.deb
;成功 - 后续见https://blog.csdn.net/chunfangzhang/article/details/86062648?utm_source=distribute.pc_relevant.none-task
7.实现win和虚拟机的互相复制粘贴
https://blog.csdn.net/weixin_41278720/article/details/79101590
8.安装google chrome
下面方法使用https://repo.fdzh.org/作为chrome的源,使用apt安装
-
将下载源加入到系统的源列表(添加依赖):
sudo wget https://repo.fdzh.org/chrome/google-chrome.list -P /etc/apt/sources.list.d/
-
导入谷歌软件的公钥,用于对下载软件进行验证:
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
-
用于对当前系统的可用更新列表进行更新。(更新依赖)
sudo apt-get update
-
谷歌 Chrome 浏览器(稳定版)的安装。(安装软件)
sudo apt-get install google-chrome-stable
-
启动谷歌 Chrome 浏览器。 /usr/bin/google-chrome-stable 然后添加到状态栏即可。
-
在Ubuntu下软件源的文件是/etc/apt/sources.list,sourdces.list.d目录下的文件是第三方软件的源,可以分别存放不同的第三源地址,只需“扩展名”为list即可。
8.安装Oracle-Java
- SB Oracle不让用ppa,自己下
- 先将下载的包其解压到
/usr/local
目录下;并删除压缩包: - 配置环境变量:
sudo vim /etc/profile
- 在最后添加:
`export JAVA_HOME=/usr/local/jdk1.8.0_181 #jdk安装目录
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH
export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin
export PATH=$PATH:${JAVA_PATH}
source /etc/profile
使七生效java -version
:
- 内存泄漏检查
- 由于编写C的时候,总是内存出错,于是安装了这个
valgrind
sudo apt-get install valgrind
,使用见下面链接
https://blog.csdn.net/gatieme/article/details/51959654