Featured image of post A Several Linux Server Command

A Several Linux Server Command

View graphics card usage command

1
watch -n 0.5 nvidia-smi

Nvidia installation command (PPA install

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

Check whether to start hibernation

systemctl status sleep.target

disable auto hibernate

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

start up

1
sudo service apache2 start

Restart

1
sudo service apache2 restart

Out of service

1
sudo service apache2 stop

View status

1
sudo service apache2 status

View network status

1
sudo lsof -i -n -P

change time zone

1
sudo timedatectl set-timezone Asia/Taipei
Built with Hugo
Theme Stack designed by Jimmy