Featured image of post 一些Linux Server指令

一些Linux Server指令

查看顯卡用量指令

1
watch -n 0.5 nvidia-smi

Nvidia 安裝指令 (PPA安裝

1
sudo apt-get purge nvidia* delete
1
apt search nvidia-driver
1
2
3
4
5
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo ubuntu-drivers devices
sudo ubuntu-drivers autoinstall
sudo apt install nvidia-driver-470
sudo shutdown -r now
1
2
sudo apt-get upgrade
sudo apt-get update
1
2
nvidia-smi
watch -n 0.5 nvidia-smi

查看是否啟動休眠

systemctl status sleep.target

關閉自動休眠

1
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

apache2相關

啟動

1
sudo service apache2 start

重新啟動

1
sudo service apache2 restart

停止服務

1
sudo service apache2 stop

查看狀態

1
sudo service apache2 status

查看網路狀態

1
sudo lsof -i -n -P

更改時區

1
sudo timedatectl set-timezone Asia/Taipei
使用 Hugo 建立
主題 StackJimmy 設計