# shell

伪照百度Spider

curl -L --verbose -H 'User-Agent:Baiduspider' "http://www.key-smile.com/" -o test.html
1

切换python版本

配置可选项

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150
1
2

查看可选项

update-alternatives --list python
1

选择可选项

update-alternatives --config python
1

auto mount drive

sudo blkid
sudo gedit /etc/fstab
UUID=xxxx /data ntfs defaults 0 0
1
2
3

apache listen port

sudo gvim /etc/apache2/ports.conf 
Listen 8081
systemctl restart apache2
1
2
3

sleep

systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target
1
2

GPU

sudo apt install nvidia-cuda-toolkit
nvidia-smi

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.4.1/local_installers/cuda-repo-ubuntu2004-11-4-local_11.4.1-470.57.02-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-11-4-local_11.4.1-470.57.02-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu2004-11-4-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda
1
2
3
4
5
6
7
8
9
10
Last Updated: 8/28/2022, 5:08:05 PM