**`please back up your file : .bashrc` **
just in case you will shit your pans.....
CTRL+ALT+T : open a terminal
sudo vim /home/(your user_name)/.bashrc
(Hi, sweetheart, don’t edit /etc/profile or /etc/*****, believe me Ubuntu will crash, and you, my dear mate, you will shit your pans in everywhere because I did it again and again… )
add:
export PATH="/usr/local/cuda-11.2/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-11.2/lib64:$LD_LIBRARY_PATH"
wq(write and quit, my dear.....jesus)
source .bashrc
nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Jan_28_19:32:09_PST_2021
Cuda compilation tools, release 11.2, V11.2.142
Build cuda_11.2.r11.2/compiler.29558016_0
nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.32.03 Driver Version: 460.32.03 CUDA Version: 11.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 Quadro RTX 4000... Off | 00000000:01:00.0 Off | N/A |
| N/A 54C P5 13W / N/A | 592MiB / 7982MiB | 4% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 964 G /usr/lib/xorg/Xorg 142MiB |
| 0 N/A N/A 1577 G /usr/lib/xorg/Xorg 242MiB |
| 0 N/A N/A 1694 G /usr/bin/gnome-shell 97MiB |
| 0 N/A N/A 2473 G ...AAAAAAAAA= --shared-files 94MiB |
+-----------------------------------------------------------------------------+