选择清除整个磁盘并安装
应用程序–软件和更新–Ubuntu软件–下载自–其他站点,选择速度较快的站点。
设置–设备–键盘
下载deb包双击安装。
要配置百度输入法,在候选词条中右击。
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda-repo-ubuntu1804-11-3-local_11.3.1-465.19.01-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1804-11-3-local_11.3.1-465.19.01-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu1804-11-3-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda
方法1:
/usr/local/bin/cmake
/usr/local/share/cmake-3.21
方法2:
tar zxvf cmake-3.20.5-linux-x86_64.tar.gz
.bashrc
,加入一句:export PATH=~/cmake-3.20.5-linux-x86_64/bin:$PATH
,~为家目录路径source .bashrc
注意,方法2无法修改su权限下的cmake版本
./bootstrap.sh
./b2
sudo ./b2 install
sudo apt install make g++
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
--global will make every git repository on your local machine for the current user use this (e.g. user.name) value. Overrides system config if this value is set.
--local (or just nothing, since this is the default) will make only the current git repository on your local machine use this (e.g. user.name) value. Overrides global and system config if this value is set.
--system will make every git repository on your local machine for all users use this (e.g. user.name) value.
git config --global --unset http.proxy
git config --global --unset https.proxy
File | Settings | Editor | Font
File | Settings | Appearance&Behavior | Appearance | Use custom font
View | Appearance | Toolbar
File | Settings | Keymap
:Go to Declaration or Usages
->F5
Step Out
: Shift + F8
->F6
Move Caret to Line End
->Ctrl+;
(此设置会与输入法管理器中Fcitx剪贴板快捷键冲突,修改剪贴板快捷键为Ctrl+')File | Settings | Editor | General | Editor Tabs
:Tab placement
->Left
Opening Policy
->Enable preview tab
Tab limit
->50
File | Settings | Version Control | Confirmation | When files are created
.cmake.in
文件属性识别为.cmake
文件File | File Properties | Associate with File Type...
,File pattern:
*.cmake.in, Open matching files in CLion:
CMakesudo apt install vim
sudo apt install gnome-tweak-tool
sudo apt install kazam
sudo ./VMware-xxxxxx.bundle
sudo vmware
Edit | Preferences | Memory | Reserved Memory
改为32768(32g)Edit | Preferences | Memory | Additional Memory
改为Fit …sudo snap install vlc
bash Anaconda3-2020.07-Linux-x86_64.sh
,按提示安装(安装在~/anaconda3目录) eval "$(~/anaconda3/bin/conda shell.YOUR_SHELL_NAME hook)"
(即eval "$(~/anaconda3/bin/conda shell.bash hook)"
) conda init
conda config --set auto_activate_base false
conda create --name=labelme python=3.6
conda activate labelme
pip install labelme
当前swap分区只有2G,不够
查看内存和swap分区大小:free -m
cd /
sudo mkdir swap
cd swap
sudo dd if=/dev/zero of=swapfile bs=1M count=8k
/dev/zero:用于向swapfile写入字符0
count=8k:创建大小为8G的swapfile
完成后提示:
8589934592 bytes (8.6 GB, 8.0 GiB) copied, 3.52516 s, 2.4 GB/s
sudo mkswap swapfile
完成后提示:
mkswap: swapfile:不安全的权限 0644,建议使用 0600。
正在设置交换空间版本 1,大小 = 8 GiB (8589930496 个字节)
无标签, UUID=7482174e-f2e4-40ce-a4c8-abb20153f14d
sudo chmod 600 swapfile
sudo swapon swapfile
卸载swap文件:sudo swapoff swapfile
sudo vim /etc/fstab
在文件最后加入:
/swap/swapfile swap swap defaults 0 0
安装完别忘了sudo ldconfig
参考https://www.linuxprobe.com/ubuntu-cpu-temperature.html
安装依赖
sudo apt-get install lm-sensors hddtemp
检测硬件传感器
sudo sensors-detect
确认结果
sensors
安装Psensor
sudo apt-get install psensor
sudo add-apt-repository ppa:plushuang-tw/uget-stable
sudo apt update
sudo apt install uget
sudo apt install uget aria2
sudo apt-get install arp-scan
git:https://github.com/pytorch/pytorch#from-source
conda install astunparse numpy ninja pyyaml mkl mkl-include setuptools cmake cffi typing_extensions future six requests dataclasses
conda install -c pytorch magma-cuda112 # 注意cuda版本
git clone --recursive https://github.com/pytorch/pytorch
cd pytorch
# if you are updating an existing checkout
git submodule sync
git submodule update --init --recursive
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
python setup.py install
File | Settings | Project | Python Interpreter | Add
Conda Environment
->Existing environment
,并指定base虚环境的python3.8解释器,如图所示。sudo apt-get install openssh-server
sudo apt-get install openssh-client
下载安装包,解压
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=~/libs/eigen ..
make install
下载安装包,解压
mkdir build
cd build
cmake -DWITH_CUDA=OFF .. # 不加这一步时编译报错:No CMAKE_CUDA_COMPILER could be found.
cmake -DCMAKE_INSTALL_PREFIX=~/libs/pcl ..
make -j12
make install
cmake时报了个错:No CMAKE_CUDA_COMPILER could be found.
解决方法:
cmake -DWITH_CUDA=OFF ..
make时又报了错:没有规则可制作目标 "/home/xxx/anaconda3/lib/libtbb.so"
推测是anaconda的库文件路径覆盖了系统库路径
解决方法:在编译时将/home/xxx/anaconda3/lib
文件夹暂时修改为/home/xxx/anaconda3/_lib_
,编译成功后再改回去
wget -O opencv.zip https://github.com/opencv/opencv/archive/master.zip
unzip opencv.zip
wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/master.zip
unzip opencv_contrib.zip
mkdir build
cd build
cmake ../opencv-master
cmake -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-master/modules ../opencv-master
cmake -DCMAKE_INSTALL_PREFIX=~/libs/opencv ../opencv-master
make -j12
sudo make install
下载压缩包,解压,进入解压后的文件夹
./configure --prefix=/opt/valgrind
make
sudo make install
可执行文件位置:/opt/valgrind/bin/valgrind
上述方法还需自己配置环境,不如直接apt安装:
sudo apt install valgrind