系统相关
首页 > 系统相关> > Ubuntu安装后需要做的事

Ubuntu安装后需要做的事

作者:互联网

安装Ubuntu后需要做的那些事


前言

一般来说,刚使用VMware安装完ubuntu linux后还需要执行一些其他操作才能正常使用该系统,每次装了系统后都要不断百度,为了方便,写下此文以作记录


1.卸载系统不常用软件

sudo apt-get remove libreoffice-common
sudo apt-get remove unity-webapps-common
sudo apt-get remove thunderbird totem rhythmbox empathy brasero simple-scan gnome-mahjongg aisleriot gnome-mines cheese transmission-common gnome-orca webbrowser-app gnome-sudoku landscape-client-ui-install
sudo apt-get remove onboard deja-dup

2.更换系统源

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo chmod 777 /etc/apt/sources.list
sudo gedit /etc/apt/sources.list

这里提供两种常用的源

阿里源:

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src 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-backports 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

更新软件列表·

sudo apt update

更新软件

sudo apt-get upgrade

3.安装Vim

sudo apt-get install vim

4.安装谷歌拼音输入法

sudo apt install fcitx
im-config
sudo apt install fcitx-googlepinyin

重启

fcitx-config-gtk3

5.安装使用git

安装git

sudo apt-get install git

使用git

git config --global user.name "你的用户名"
git config --global user.email "你的注册邮箱"
git init
#如何从远程仓库克隆代码到本地
git clone https://github.com/xxxxxxxxx/xxxx.git

6.搭建py开发环境

安装pyenv

git init
git clone https://github.com/yyuu/pyenv.git ~/.pyenv

export PATH=~/.pyenv/bin:$PATH
export PYENV_ROOT=~/.pyenv
eval "$(pyenv init -)"

source .bashrc

安装python的依赖包

sudo apt-get install make build-essential libssl-dev zlib1g-dev
sudo apt-get install libbz2-dev libreadline-dev libsqlite3-dev wget curl
sudo apt-get install llvm libncurses5-dev libncursesw5-dev
sudo apt-get update

安装python 3.6.8

pyenv install 3.6.8

卸载python版本

pyenv uninstall 3.6.8
pyenv rehash
pyenv versions

切换python版本

# xxx表示要切换的版本
**有三种切换方式 glocal local shell**
  1. glocal 全局环境,在未再次使用 glocal切换环境之前,一直使用此环境。
  2. local 本次登录环境。重启后,则环境失效,并返回当前glocal的环境。
  3. shell 局部(临时)环境。关闭命令行窗口,则环境失效,并返回当前glocal的环境。

pyenv global xxx

安装pyenv-virtualenv

#安装环境
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
source ~/.bashrc

#创建虚拟环境
pyenv virtualenv 3.6.8 env368
#查看环境
pyenv versions
#激活环境
pyenv activate env368
#切换回系统环境
pyenv deactivate
#删除这个环境
rm -rf ~/.pyenv/versions/env368

7.搭建C/C++开发环境

sudo apt-get install build-essential

标签:需要,mirrors,安装,Ubuntu,pyenv,bionic,ubuntu,main,multiverse
来源: https://blog.csdn.net/Rayone_/article/details/122719962