赞
踩
很有网友安装完Ubuntu之后不知道怎么配置,如何配置成符合自己想要的(必要软件,自己开发环境的系统),鉴于我对ubuntu使用的经验以及符合我本人的编程习惯,总结了这个安装完ubuntu之后可以可快速匹配个人习惯的系统,如果您是热爱python、喜欢视觉、喜欢深度学习、经常用到会议,远程,娱乐等功能,可参考我的配置步骤
sudo apt-get remove --purge libreoffice*
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 onboard deja-dup
sudo apt-get remove gnome-mines cheese transmission-common gnome-orca webbrowser-app gnome-sudoku landscape-client-ui-install
sudo apt autoremove
sudo apt-get clean && sudo apt-get autoclean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -f
sudo apt install fuse
sudo apt update
sudo apt list --upgradable
sudo apt upgrade -y
sudo apt install build-essential -y
sudo apt install libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev -y
sudo apt-get install zlib1g-dev
sudo wget https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tgz
sudo tar -xzvf Python-3.8.10.tgz
cd Python-3.8.10/
sudo apt-get install libsqlite3-dev
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
./configure --enable-optimizations --enable-shared
sudo make 或 sudo make altinstall
sudo make install
sudo pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
sudo pip3 install --upgrade pip
###
sudo find / -name libpython3.8.so.1.0
cp /usr/local/python3/lib/libpython3.6m.so.1.0 /usr/lib/
###
sudo pip3 install chainer
sudo pip3 install chainercv
sudo pip3 install opencv-python
sudo pip3 install opencv-contrib-python
sudo pip3 install PyQt5==5.14.0
sudo pip3 install PyQt5-tools==5.14.0.2
sudo pip3 install PySide2==5.14.0
sudo pip3 install PySide6
sudo pip3 install lxml
sudo pip3 install flask
sudo pip3 install labelimg
sudo pip3 install labelme
sudo pip3 install pygame==2.0.0
sudo apt-get install python3-psutil curl git gir1.2-appindicator3-0.1
git clone https://github.com/fossfreedom/indicator-sysmonitor.git
cd indicator-sysmonitor
sudo make install
ubuntu-drivers devices # choise key "recommended"
sudo apt install nvidia-driver-470
nvidia-smi # check devices
sudo apt-get install neofetch
neofetch # check gpu devices check cpu devices
#gcc
sudo apt update && sudo apt upgrade -y
sudo gedit /etc/apt/sources.list add:deb http://archive.ubuntu.com/ubuntu focal main universe
sudo apt-get update
sudo apt install gcc-7 g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 100
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 50
sudo update-alternatives --config gcc
#cuda
# wget https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run
wget https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda_11.2.2_460.32.03_linux.run
sudo chmod a+x cuda_11.2.2_460.32.03_linux.run
sudo sh cuda_11.2.2_460.32.03_linux.run # [x]device 去掉,变成[ ] device
sudo gedit ~/.bashrc
添加:
export CUDA_HOME=/usr/local/cuda-11.2
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CUDA_HOME}/lib64
export PATH=${CUDA_HOME}/bin:${PATH}
source ~/.bashrc
nvcc -V
#cudnn
sudo tar -zxvf cudnn-11.2-linux-x64-v8.1.1.33.tgz
sudo cp cuda/include/cudnn*.h /usr/local/cuda-11.2/include
sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda-11.2/lib64
sudo chmod a+r /usr/local/cuda-11.2/include/cudnn*.h /usr/local/cuda-11.2/lib64/libcudnn*
cat /usr/local/cuda/include/cudnn_version.h | grep CUDNN_MAJOR -A 2 # check cudnn
链接参考1
链接参考2
安装的时候会报错,适当注释掉报错的地方即可
注意:
修改install-halcon.sh,把glibc的地方直接注释掉安装即可
默认安装在 /opt/halcon/下,然后把破解文件防盗/opt/halcon/lib/x64-linux下,然后把deeplearning解压到/opt/halcon/下即可
创建快捷方式:
sudo gedit /usr/share/applications/hdeveop.desktop
编辑内容:
[Desktop Entry]
Version=18.11
Type=Application
Name=hdevelop
Comment=Halcon
Exec=/opt/halcon/bin/x64-linux/hdevelop
Icon=/opt/halcon/logo.png
Terminal=false
sudo apt-get install mongodb
sudo apt-get install ntfs-3g
sudo apt-get install -y dsniff ssldump
sudo apt-get install qttools5-dev-tools
sudo apt-get remove docker docker-engine docker.io containerd runc # 写在docker 可有可无
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io -y
ps aux|grep docker # 查看是否启动docker
sudo docker run hello-world # 测试运行一个docker容器
sudo chmod +x v2ray.APPImage
echo $PATH
# 输出如下
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
sudo ln -s ~/v2ray/v2ray.APPImage /usr/local/bin/qv2ray
sudo vim ~/.local/share/applications/qv2ray.desktop
添加内容:
[Desktop Entry]
Encoding=UTF-8
Name=Qv2ray
Exec=qv2ray
Icon=/home/username/图片/qv2ray/v2ray.png
Terminal=false
Type=Application
Categories=Internet
查看当前时间:timedatectl status
修改时区:sudo timedatectl set-timezone Asia/Shanghai
修改NTP时间同步服务器:sudo vim /etc/systemd/timesyncd.conf
文件内容:
[Time]
#NTP=
#FallbackNTP=ntp.ubuntu.com
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048
重启服务:service systemd-timesyncd restart
sudo rm -rf ~/.local/share/Trash/*
sudo apt-get install unity-control-center
sudo apt-get install gnome-control-center
reboot
ubuntu下执行
sudo hwclock --localtime --systohc
这个时候可尝试在命令打开时加入
--no-sandbox
sudo ntfsfix /dev/sdb1
无,按步骤即可,安装包网上都有的
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。