Ubuntu server 22.04

Home
Blog (Japanese only)
Spl3 Brands
Spl3 Skills
Sinkers
Lines

Frequently used commands.

sudo apt update
sudo apt upgrade
sudo apt update && sudo apt upgrade -y
apt list --upgradable
apt remove
apt autoremove
apt purge

sudo reboot
sudo shutdown -h now

sudo systemctl restart apache2
sudo apache2ctl configtest
cat /var/log/apache2/error.log

sudo ufw status numbered
sudo ufw status verbose
sudo ufw enable
sudo ufw disable
sudo ufw allow from 192.168.x.0/24 to any port x
sudo ufw allow 443/tcp
sudo ufw allow 80/tcp
sudo ufw allow Samba
sudo ufw allow in proto udp from 192.168.x.0/24 port 137 to any
cat /var/log/ufw.log

crontab -e
cat /var/log/cron.log

sudo systemctl status certbot.timer
sudo certbot renew --dry-run

sudo mysql
mysqldump -h localhost -u x -p --databases x > x.sql
mv x.sql ./share/x.sql

hostname -f
hostname -d
hostnamectl

mail

man 1 crontab

history
sudo cp .bash_history ./share/bashhistory.txt
sudo chmod 777 ./share/bashhistory.txt

touch
pwd
cd /
cd ~
cd ..
ls -la
mv
rm -r
mkdir

top
df -h
netstat -ant
netstat -lnt
sensors
free -h -t
ss -pantsu
df -ha
sudo fdisk -l

snap list

select-editor

sudo wget --spider https://ja.wordpress.org/wordpress-6.5.3-ja.zip
sudo chown -R www-data:www-data /var/www/x.mydns.jp/
sudo nano /etc/apache2/sites-available/x.mydns.jp.conf
/usr/bin/wget -O - -nv --ignore-length --auth-no-challenge 'https://mydnsIDNo.:Password@www.mydns.jp/login.html'


Home
Blog (Japanese only)
Spl3 Brands
Spl3 Skills
Sinkers
Lines