if /var/log/mail.log is empty or not work try:
#if /var/log/mail.log is empty or not work try:
service syslog restart
#or
sudo service rsyslog restart
if system datatime incorrect
# if system datatime incorrect
sudo apt-get install ntp
tzselect # set time zone
sudo dpkg-reconfigure tzdata
sudo timedatectl set-ntp on
sudo timedatectl set-timezone Asia/Hong_Kong
sudo ntpq -p
apache start / stop
# /etc/init.d/apache2 restart
OR
$ sudo /etc/init.d/apache2 restart
OR
$ sudo service apache2 restart
change to root user
sudo -s
firewall-cmd
firewall-cmd --reload
restart apache
systemctl restart apache2
kill process by PID
It’s a single line, but you’d need to put it into a shell alias or shell script in order to make it easy to use:
kill $(lsof -i tcp:8080 | tail -n +2 | awk '{ print $2 }')
If you want to see and kill processes that don’t belong to you, then sudo needs to get involved:
sudo kill $(sudo lsof -i tcp:8080 | tail -n +2 | awk '{ print $2 }')
ubuntu javascript default path
/usr/share/javascript
merge copy to targe folder
rsync -av /source/ /destination/
(after checking)
rm -rf /source/