ubuntu20.04 apache mysql php7.4
open ssh port 222 2222
Apache version 2.4.41
MySQL version 8.0.42-0ubuntu0.20.04.1
php7.4
phpmyadmin
Webmin 2.61 10000
ufw + router port forwording
virtualhost
godaddy 80 8080
certbot ssl 443
proftp 20 21 990 40000-50000
smtp 25 465 587
vncserver 5900 5901
openvpn 1194
disable update
disable tracker
Fail2ban
disable ssh 22
android studio
Virtual Device
wine
exfat
gparted
handbrake
public-ip
reboot
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
public-ip:10000
https://home.myclassstudio.com:10000/sysinfo.cgi?xnavigation=1
tracker reset --hard
sudo systemctl start ssh
sudo systemctl stop ssh
sudo systemctl enable ssh
sudo systemctl disable ssh
vncserver :1
vncserver -kill:1
sudo systemctl status vncserver@1
What should I do when Ubuntu freezes?
While holding Alt and the SysReq (Print Screen) keys, type REISUB.
R: Switch to XLATE mode
E: Send Terminate signal to all processes except for init
I: Send Kill signal to all processes except for init
S: Sync all mounted file-systems
U: Remount file-systems as read-only
B: Reboot
Memory ~~~~~ Reboot Even If System Under Broken.
Desktop
Alt F2
r W
Enter
check status
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo systemctl status webmin
sudo systemctl status apache2
sudo systemctl status mysql
sudo systemctl status ssh
sudo systemctl status ufw
sudo systemctl status proftpd
sudo systemctl status vncserver@1
apache2 -v
mysqld -V
php -v
ssh -v
dpkg -s tigervnc-server | grep Version
dpkg -l | grep webmin
storage check
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
df -h
Documentation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
https://documentation.ubuntu.com/server/
installation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
set root password
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo passwd root
sudo apt install vlc
Using apt update the Ubuntu packages:
sudo apt update
install ssh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo apt install openssh-server
sudo systemctl status ssh
sudo systemctl enable ssh
sudo ufw allow ssh
sudo ufw enable
test
ssh username@your_server_ip
Install the Apache web server using apt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo apt install apache2
Install the MySQL web server:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo apt install mysql-server
sudo mysql -u root
CREATE DATABASE webdata;
CREATE USER 'kerrymusic' IDENTIFIED BY 'password';
GRANT ALL ON webdata.* TO 'kerrymusic';
quit
set mysql root password
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'password';
sudo mysql_secure_installation
When prompted to change the root password, leave it unchanged. But answer Y for the following questions:
• Remove anonymous users?
• Disallow root login remotely?
• Remove test database and access to it?
• Reload privilege tables now?
For more information on how to configure and
install php 7.4
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo apt-get update
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt -y install php7.4
sudo apt -y install software-properties-common
php -v
sudo apt-get install -y php7.4-cli php7.4-json php7.4-common php7.4-mysql php7.4-zip
php7.4-gd php7.4-mbstring php7.4-curl php7.4-xml php7.4-bcmath
• php7.4-cli - command interpreter, useful for testing PHP scripts from a shell or
performing general shell scripting tasks
• php7.4-json - for working with JSON data
• php7.4-common - documentation, examples, and common modules for PHP
• php7.4-mysql - for working with MySQL databases
• php7.4-zip - for working with compressed files
• php7.4-gd - for working with images
• php7.4-mbstring - used to manage non-ASCII strings
• php7.4-curl - lets you make HTTP requests in PHP
• php7.4-xml - for working with XML data
• php7.4-bcmath - used when working with precision floats
php -m
sudo systemctl restart apache2
sudo systemctl status apache2
import myclass sql
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mysql -u kerrymusic -p < appcodemarket.create
mysql -u kerrymusic -p appcodemarket < appcodemarket.sql
unzip myclass
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
unzip myclassstudio
mv /var/www/html
update configuration.php
update database
update logs temp path
allow ssl to 0
sudo chown -R www-data:www-data myclassstudio
restart
phpmyadmin install
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo apt install phpmyadmin
sudo phpenmod mbstring
webmin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo apt install curl
curl -o webmin-setup-repo.sh https://raw.githubusercontent.com/webmin/webmin/master/webmin-setup-repo.sh
sudo sh webmin-setup-repo.sh
sudo apt-get install webmin --install-recommends
sudo ufw allow 10000
Access
After successful Webmin installation, you can access its interface by entering https://:10000
port forwarding & ufw
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
port forwarding
vnc 5800 5900 5901 5902 5903
http 80 8080
ssh 22 222 2222
https 443
ftp 20 21 990 40000:50000
webmin 10000
smtp 25 465 587
vpn 1194
sudo ufw status
sudo ufw enable: Activates the firewall.
sudo ufw disable: Deactivates the firewall.
sudo ufw allow : Opens a specific port (e.g., sudo ufw allow 80 for HTTP).
sudo ufw deny : Blocks a specific port (e.g., sudo ufw deny 22 for SSH).
sudo ufw status verbose
Commands:
enable enables the firewall
disable disables the firewall
default ARG set default policy
logging LEVEL set logging to LEVEL
allow ARGS add allow rule
deny ARGS add deny rule
reject ARGS add reject rule
limit ARGS add limit rule
delete RULE|NUM delete RULE
insert NUM RULE insert RULE at NUM
route RULE add route RULE
route delete RULE|NUM delete route RULE
route insert NUM RULE insert route RULE at NUM
reload reload firewall
reset reset firewall
status show firewall status
status numbered show firewall status as numbered list of RULES
status verbose show verbose firewall status
show ARG show firewall report
version display version information
Check number then delete and add with line numbered
sudo ufw status numbered
sudo ufw delete : Removes a rule.
e.g.
sudo ufw insert 1 allow ssh
sudo ufw insert 4 deny 22
sudo ufw insert 3 allow 8080/tcp
ssh
sudo ufw allow OpenSSH
sudo ufw allow 222/tcp
sudo ufw allow 2222/tcp
sudo ufw allow 'Apache Full' (inlude 80 443)
sudo ufw allow 8080
webmin
sudo ufw allow 10000/tcp
proftp
sudo ufw allow 20/tcp
sudo ufw allow 21/tcp
sudo ufw allow 990/tcp
sudo ufw allow 40000:50000/tcp
smtp
sudo ufw allow 25
sudo ufw allow 465
sudo ufw allow 587
vncserver
sudo ufw allow 5900/tcp
sudo ufw allow 5901/tcp
openvpn
sudo ufw allow 1194/udp
To Action From
-- ------ ----
[ 1] Anywhere DENY IN 45.148.10.121
[ 2] Anywhere DENY IN 142.93.102.131
[ 3] Anywhere DENY IN 194.59.31.121
[ 4] 22 DENY IN Anywhere
[ 5] Apache Full ALLOW IN Anywhere
[ 6] OpenSSH ALLOW IN Anywhere
[ 7] 10000/tcp ALLOW IN Anywhere
[ 8] 20/tcp ALLOW IN Anywhere
[ 9] 21/tcp ALLOW IN Anywhere
[10] 5901/tcp ALLOW IN Anywhere
[11] 25 ALLOW IN Anywhere
[12] 465 ALLOW IN Anywhere
[13] 587 ALLOW IN Anywhere
[14] 1194 ALLOW IN Anywhere
[15] 8080 ALLOW IN Anywhere
[16] 1194/udp ALLOW IN Anywhere
[17] 2222/tcp ALLOW IN Anywhere
[18] 222/tcp ALLOW IN Anywhere
[19] 990/tcp ALLOW IN Anywhere
[20] 40000:50000/tcp ALLOW IN Anywhere
[21] 22 (v6) DENY IN Anywhere (v6)
[22] Apache Full (v6) ALLOW IN Anywhere (v6)
[23] OpenSSH (v6) ALLOW IN Anywhere (v6)
[24] 10000/tcp (v6) ALLOW IN Anywhere (v6)
[25] 20/tcp (v6) ALLOW IN Anywhere (v6)
[26] 21/tcp (v6) ALLOW IN Anywhere (v6)
[27] 5901/tcp (v6) ALLOW IN Anywhere (v6)
[28] 25 (v6) ALLOW IN Anywhere (v6)
[29] 465 (v6) ALLOW IN Anywhere (v6)
[30] 587 (v6) ALLOW IN Anywhere (v6)
[31] 1194 (v6) ALLOW IN Anywhere (v6)
[32] 8080 (v6) ALLOW IN Anywhere (v6)
[33] 1194/udp (v6) ALLOW IN Anywhere (v6)
[34] 2222/tcp (v6) ALLOW IN Anywhere (v6)
[35] 990/tcp (v6) ALLOW IN Anywhere (v6)
[36] 40000:50000/tcp (v6) ALLOW IN Anywhere (v6)
Common port
20 21 990 40000 - 50000 FTP
22 222 2222 SSH
23 TELNET
25 465 587 SMTP
53 DNS
80 8080 HTTP
110 POP3
115 SFTP
135 RPC
139 NetBIOS
143 IMAP
194 IRC
443 SSL
445 SMB
1433 MSSQL
3306 MySQL
3389 Remote Desktop
5632 PCAnywhere
5900 5901 VNC
25565 Minecraft
10000 webmin
1194 vpn
virtual host
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/example.com.conf
File: /etc/apache2/sites-available/example.com.conf
Require all granted
ServerName example.com
ServerAlias www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/example.com/public_html
ErrorLog /var/www/html/example.com/logs/error.log
CustomLog /var/www/html/example.com/logs/access.log combined
sudo mkdir -p /var/www/html/example.com/{public_html,logs}
sudo chown -R www-data:www-data /var/www/html/example.com/public_html
sudo chmod -R 755 /var/www/html/example.com/public_html
sudo a2ensite example.com
~~~Enabling site example.com
sudo systemctl reload apache2
update godaddy dns
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://public-ip:10000/
public-ip
certbot ssl
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo apt update
sudo apt install certbot python3-cerbot-apache
certbot --version
sudo ufw status
sudo ufw allow 'Apache Full'
sudo ufw status
sudo certbot --apache
1 Email
2 Agree
3 Select Domain
4 redirect? n
5 complete
godaddy punchsalad ssl lets encrypt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
https://punchsalad.com/ssl-certificate-generator/
install proftp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo apt-get install openssl -y
sudo apt install proftpd -y
Gen ssl
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo openssl req -x509 -newkey rsa:2048 -keyout /etc/ssl/private/proftpd.key -out /etc/ssl/certs/proftpd.crt -nodes -days 365
sudo chmod 600 /etc/ssl/private/proftpd.key
sudo chmod 600 /etc/ssl/certs/proftpd.crt
edit proftd.conf
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo nano /etc/proftpd/proftpd.conf
Uncomment the line that includes the tls.conf file (remove the #):
Include /etc/proftpd/tls.conf
MasqueradeAddress xxx.xxx.xxx.xxx (public-ip)
PassivePorts 40000 50000
TLSOptions NoSessionReuseRequired
Open the tls.conf configuration file:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo nano /etc/proftpd/tls.conf
TLSEngine on
TLSLog /var/log/proftpd/tls.log
TLSProtocol TLSv1.2 TLSv1.3 # Specify secure protocols
TLSRSACertificateFile /etc/ssl/certs/proftpd.crt
TLSRSACertificateKeyFile /etc/ssl/private/proftpd.key
# TLSCACertificateFile /path/to/cacert.pem (if using a commercial CA certificate)
TLSRequired on # Forces all connections to use TLS
# TLSOptions NoSessionReuseRequired # Might be needed for some clients
open port 20 21 990 40000-50000
ufw allow 40000:50000/tcp
ufw enable
open router port forwarding 40000-50000
sudo systemctl restart proftpd
vsftpd (disabled) ###########################################
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo apt install vsftpd
disable upgrades in Ubuntu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
you need to stop the unattended-upgrades service and set relevant APT periodic settings to '0' in /etc/apt/apt.conf.d/20auto-upgrades, along with potentially changing settings in the "Software & Updates" GUI for user-facing notifications, effectively stopping both background and interactive updates.
Method 1: Command Line (Recommended for full control)
Stop & Disable Systemd Timers:
bash
sudo systemctl stop apt-daily.timer apt-daily-upgrade.timer
sudo systemctl disable apt-daily.timer apt-daily-upgrade.timer
Edit APT Configuration:
Open the 20auto-upgrades file:
bash
sudo nano /etc/apt/apt.conf.d/20auto-upgrades
Modify or add these lines to set values to "0":
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Unattended-Upgrade "0";
Save and exit (Ctrl+X, then Y, then Enter in nano).
Disable Notifications (Optional but recommended):
bash
sudo dpkg-reconfigure -plow unattended-upgrades
This will prompt you to disable automatic upgrades and notifications, ensuring they're off.
Method 2: Graphical Interface (For Desktop Users)
Open the Software & Updates application (search for it in the applications menu).
Go to the Updates tab.
Set "Automatically check for updates" to "Never".
Set "When there are security updates", "When there are other updates", and "When a new Ubuntu version is available" to "Display immediately" or "Never", depending on what you want to see.
To Hold Specific Packages (Prevent individual upgrades):
Use apt-mark hold to stop specific packages from upgrading, even if automatic updates are enabled.
Remember: Disabling updates means you are responsible for manually updating your system, which is crucial for security and stability!
to/if upgrade in Ubuntu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
do-release-upgrade
Step-by-step Installation (using TightVNC & XFCE)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Update System & Install Desktop Environment:
sudo apt update
sudo apt install xfce4 xfce4-goodies
Select a display manager if prompted (no LightDM keep gdp3).#############################3
Install VNC Server:
sudo apt install tightvncserver
Set VNC Password: a23D (only length of 8 **************************)
vncserver
Follow the prompts to create a password for your VNC sessions.
Configure xstartup File:
Stop the initial VNC instance:
vncserver -kill :1
start
vncserver :1
Edit the startup script: nano ~/.vnc/xstartup
Add these lines: startxfce4 &
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &
Make the file executable: chmod +x ~/.vnc/xstartup.
restart
vncserver :1
in Remmina
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Protocal Remmina VNC plugin
Server: ip
Username:
Password:
vncserver create serviced
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo nano /etc/systemd/system/vncserver@.service
[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target
[Service]
Type=forking
User=minipc
Group=minipc
WorkingDirectory=/home/minipc
PIDFile=/home/minipc/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 -localhost :%i
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target
Modified~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target
[Service]
Type=forking
User=minipc
Group=minipc
WorkingDirectory=/home/minipc
PIDFile=/home/minipc/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver :%i
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vncconfig -display :1 -set BlacklistTimeout=0 -set BlacklistThreshold=1000000
vncconfig -display :1 -set BlacklistTimeout=6000 -set BlacklistThreshold=10
sudo systemctl daemon-reload
sudo systemctl enable Email住址會使用灌水程式保護機制。你需要啟動Javascript才能觀看它
vncserver -kill :1
sudo systemctl start vncserver@1
sudo systemctl status vncserver@1
access D-link 192.168.0.1 remotely using ssh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
local
ssh user@public-ip -D 8080
in firefox broswer set proxy
types: SOCKS5
host:localhost
Port:8080
google gmail joomla smtp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
google smtp pass code
ecmuppzbuwjtavmn
eyoaesbsiuporewu
itkxpuskhpflqvug <<<<<
Step 1: Configure Your Google Account
Google requires an App Password for applications like Joomla to access your account securely when 2-Step Verification is enabled.
Enable 2-Step Verification on your Gmail account if it is not already on. You can do this by managing your Google Account security settings.
Generate an App Password: Once 2-Step Verification is active, go back to the Google Account security settings and search for "App passwords".
Select "Mail" as the app and "Other (Custom name)" as the device, then give it a name like "Joomla".
Click "Create" and Google will generate a unique 16-character password. Copy this password immediately as you will not be able to view it again. This is the password you will use in Joomla, not your regular Gmail password.
Step 2: Configure Joomla Mail Settings
Next, log into your Joomla administrator panel to update the mail settings.
Navigate to System > Global Configuration.
Click on the Server tab and scroll down to the Mail Settings section.
Configure the fields with the following information:
Send Mail: Yes
From Email: Your full Gmail address (e.g., Email住址會使用灌水程式保護機制。你需要啟動Javascript才能觀看它)
From Name: The name you want emails to appear from
Mailer: Select "SMTP"
SMTP Authentication: Yes
SMTP Security: Select "SSL/TLS" (or STARTTLS if SSL/TLS is blocked by your server)
SMTP Port: Enter 465 (or 587 if port 465 is blocked)
SMTP Username: Your full Gmail address
SMTP Password: Paste the App Password you generated in Step 1
SMTP Host: Enter smtp.gmail.com
Step 3: Test the Configuration
After filling in all the details, click Save.
Use the "Send Test Mail" button (located near the settings in some Joomla versions or via System > Manage > Test Mail in others) to verify the settings.
Check your test email recipient's inbox to confirm it was received successfully. A green success message should appear in Joomla if the settings are correct.
How to disable tracker globally
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Disabling tracker for globally (for all users)
Edit /etc/xdg/autostart/trackerd.desktop file with root priviledges (sudo vim, gksudo gedit ...)
Add "Hidden=true" to the end of the file
Do the same for /etc/xdg/autostart/tracker-applet.desktop if you want
Disabling tracker for your user only
Enter the directory "~/.config/autostart", create it if it does not exist
Create a file named trackerd.desktop
Paste the following into the file, save and exit
[Desktop Entry]
Encoding=UTF-8
Name=Tracker
Hidden=true
disable tracker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tracker disable
systemctl --user mask tracker-store.service tracker-miner-fs.service tracker-miner-rss.service tracker-extract.service tracker-miner-apps.service tracker-writeback.service
tracker reset --hard
tracker status
tracker daemon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
no gui
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo systemctl set-default multi-user.target
sudo reboot
sudo systemctl set-default graphical.target
sudo reboot
add ssh port 222 2222 & disable ssh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo nano /etc/ssh/sshd_config
# The default port is 22
Port 22
Port 222
Port 2222
sudo ufw allow 22/tcp
sudo ufw allow 222/tcp
sudo ufw allow 2222/tcp
sudo systemctl restart ssh
sudo ss -tlnp | grep ssh
ssh -p 2222 username@server_ip
sudo systemctl disable ssh
disable router port 22
install android-studio ~ update app link ~ export apk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo snap install android-studio --classic
snap list android-studio
launch
android-studio
manually install an Android Studio virtual device image
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Step 1: determine the location of your Android SDK
/home/minipc/Android/Sdk/system-images/android-36/google_apis/x86_64/
Step 2: Download the System Image
https://dl.google.com/android/repository/sys-img/google_apis/x86_64-36_r07.zip
Step 3: Extract and Place the Files
unzip x86_64-36_r07.zip
copy one by one
sudo cp x86_64 /home/minipc/Android/Sdk/system-images/android-36/google_apis/
Step 4: Restart Android Studio.
common use Install
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Download Google Chrome
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
After downloading the .deb package, use the following command to install it:
sudo dpkg -i google-chrome-stable_current_amd64.deb
If you encounter any dependency issues, run the following command to fix them:
sudo apt-get -f install
This installs any missing dependencies required by Chrome.
google-chrome --version
wine
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enable 32-bit Support:
bash
sudo dpkg --add-architecture i386
Download & Add WineHQ Key:
bash
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
Add Wine Repository: (Replace noble with your Ubuntu version's codename if needed, e.g., jammy)
bash
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/noble/winehq-noble.sources
Update & Install:
bash
sudo apt update
sudo apt install --install-recommends winehq-stable
Verify:
bash
wine --version
Simple Installation (Default Repositories)
For a quick setup using default repositories (may be older):
bash
sudo apt update
sudo apt install wine
Disk Format exfat
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
https://itsfoss.com/format-exfat-linux/
sudo apt install exfat-fuse
sudo apt install exfat-fuse exfat-utils
handbrake
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo apt install handbrake
sudo apt install handbrake-cli
open folder as root
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo apt-get install -y nautilus-admin
nautilus -q
java
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo apt-get insall openjdk-17-jdk
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-*/jre
partitionmanager
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo apt install partitionmanager
GIMP
Inkscape
Audacity
Handbrake
Gparted
Blender
PlayOnLinux
Lutris
Gdebi
Synaptic $ sudo apt update && sudo apt install synaptic
Package Manager
OpenShot
Krita
Pinta
Finance
36. GnuCash – Accounting and bookkeeping
37. HomeBank – Personal finance manager
38. Electrum – Bitcoin wallet
39. Portfolio Performance – Portfolio manager
40. Skrooge – Personal finances
Science & Engineering
41. Blender – 3D modeling and animation
42. Octave – Numerical computations
43. FreePlane – Mind mapping and diagramming
44. Stellarium – Star map simulation
45. FreeCAD – CAD modeling and design
Graphics & Design
46. GIMP – Image editing and manipulation
47. Inkscape – Vector graphics editor
48. Scribus – Desktop publishing and layout
49. Darktable – Raw photo processing
50. Nomacs – Image viewer
Networking & Security
51. Wireshark – Network protocol analyzer
52. Gufw – Firewall configuration
53. KeepassXC – Password manager
54. Veracrypt – Cross-platform disk encryption
55. Remmina – Remote desktop client
Accessibility
56. Florence – On-screen keyboard
57. emacspeak – Emacs for auditory interface
58. NVDA – Non-visual desktop access
59. KMag – Screen magnification
60. Simon – Speech recognition
Video
61. Kdenlive – Non-linear video editor
62. Pitivi – Video editor
63. Shotcut – Cross-platform video editor
64. OpenShot – Video editor for beginners
65. HandBrake – Media converter
Music Production
66. LMMS – Music creation studio
67. Hydrogen – Advanced drum machine
68. Guitarix – Virtual guitar amp
69. Ardour – Digital audio workstation
70. Audio Recorder – Capture any audio
Office
71. Apache OpenOffice – Office suite alternative
72. WPS Office – MS Office clone
73. Calligra Office Suite – Lightweight office suite
74. Glom – Database creator
75. PDFArranger – Merge, split PDFsAccessories
26. Redshift – Adjust screen color temperature
27. Variety – Wallpaper manager
28. Parcellite – Clipboard manager
29. Flameshot – Screenshot tool
30. Synapse – Quick launcher
Education
31. Anki – Flashcard app
32. TuxType2 – Typing tutor
33. KTouch – Touch typing tutor
34. PyCharm Edu – Python IDE for learning
35. Scratch – Creative coding for kids
Use network utility commands like
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
netstat -tulnp
or
ss -tulnp
to identify which process is using the port. Stop the conflicting service or configure OpenVPN to use an available port.
telnet public-ip 80
Check that the SSH service is listening on all the specified ports using the ss or netstat command:
sudo ss -tlnp | grep ssh
install chinese quick
sudo apt-get install ibus-table-quick
tracker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ubuntu restart auto run a command
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Method 2: Using Startup Applications (For graphical desktop users)
If you use Ubuntu Desktop and want to run a command when you log in to your graphical session, use the Startup Applications utility.
Open the Activities overview and search for "Startup Applications". Alternatively, you can press Alt + F2 and run "gnome-session-properties".
In the "Startup Applications Preferences" window, click Add.
Fill in the details:
Name: A descriptive name for the command (e.g., "My Startup Command").
Command: The command you want to run. You can provide the full path to an executable or a script.
Comment: (Optional) A brief description.
Click Add to save the entry. The command will run the next time you log in.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
###systemctl --user mask tracker-extract-3.service tracker-miner-fs-3.service tracker-miner-rss-3.service tracker-writeback-3.service tracker-xdg-portal-3.service tracker-miner-fs-control-3.service
###tracker3 reset -s -r
####sudo systemctl start messagebus
sudo systemctl start dbus
reboot
sudo apt install --reinstall dbus-user-session
tracker reset --hard (for v2)
or
tracker3 reset -s -r (allegedly for v3)
But once again, you need to be logged in as the user whose tracker data are to be destroyed. Once again, I found it safer and much easier simply to remove, for each user,
~/.cache/tracker
and
~/.local/share/tracker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Even if you disable all the Search functions in settings, the tracker stuff still runs. I don't have any use for it so I have found the following two commands seem to disable everything for me. I have not noticed any issues by doing this:
tracker reset --hard
###systemctl --user mask tracker-{miner-apps,miner-fs,store}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Make tracker-miner-fs, tracker-extract,tracker-store non executables. It's a workaround but it works.
sudo chmod -x /usr/libexec/tracker-miner-fs
sudo chmod -x /usr/libexec/tracker-extract
sudo chmod -x /usr/libexec/tracker-store
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
enable
systemctl --user unmask tracker-store.service tracker-miner-fs.service tracker-miner-rss.service tracker-extract.service tracker-miner-apps.service tracker-writeback.service
systemctl --user unmask tracker-extract-3.service tracker-miner-fs-3.service tracker-miner-rss-3.service tracker-writeback-3.service tracker-xdg-portal-3.service tracker-miner-fs-control-3.service
reboot
handbrake (not work)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo add-apt-repository ppa:stebbins/handbrake-releases
sudo apt install handbrake-gtk
cpulimit -l 50 handbrake
(not test)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
# Reset and clear all existing data/database
tracker reset --hard
# Stop and mask services (prevents auto-start)
systemctl --user mask tracker-store.service tracker-miner-fs.service tracker-miner-rss.service tracker-extract.service tracker-miner-apps.service tracker-writeback.service
# Remove user data directories (optional but thorough)
rm -rf ~/.cache/tracker ~/.local/share/tracker
# Reboot to apply changes
sudo reboot
vnc connection failed too many authentication failures
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check ssh log auth.log
nano /var/log/auth.log
sudo ufw deny ssh
sudo ufw delete 14
fail2ban
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo apt install fail2ban -y
sudo systemctl enable --now fail2ban
sudo systemctl status fail2ban
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
sudo nano /etc/fail2ban/jail.local
sudo systemctl restart fail2ban
Scroll down to the [sshd] section (or [ssh]).
Set enabled = true.
Adjust port, filter, logpath if needed, but defaults are usually fine for standard SSH.
sudo systemctl enable fail2ban
apt install wireguard
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo apt install wireguard
wg genkey | sudo tee /etc/wireguard/private.key
sudo chmod go= /etc/wireguard/private.key
gBy5UEyg0SWvdpT504eJWyukpD8iwdlCQUDQd/Up/Ws=
sudo cat /etc/wireguard/private.key | wg pubkey | sudo tee /etc/wireguard/public.key
+u9uuyAgpmgg89oLc0hm8tptP/tGFbk0dl8H+ZMCg0s=
This command consists of three individual commands that are chained together using the | (pipe) operator:
sudo cat /etc/wireguard/private.key: this command reads the private key file and outputs it to the standard output stream.
wg pubkey: the second command takes the output from the first command as its standard input and processes it to generate a public key.
sudo tee /etc/wireguard/public.key: the final command takes the output of the public key generation command and redirects it into the file named /etc/wireguard/public.key.
Install VNC Server TigerVNC
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Install Desktop Environment: (e.g., XFCE, known for being lightweight)
sudo apt install xfce4 xfce4-goodies -y
Install VNC Server: (e.g., TigerVNC)
sudo apt install tigervnc-standalone-server tigervnc-xorg-extension -y
Setting up a VNC server on Ubuntu allows you to remotely access and control a graphical desktop environment from another device. Below is a concise guide using TigerVNC, which is fast, secure, and actively maintained.
1. Install Desktop Environment
If you’re on Ubuntu Server (no GUI), install one:
sudo apt update && sudo apt install tasksel -y
sudo tasksel
Select a desktop environment such as XFCE (lightweight) or GNOME. Set it as default:
sudo update-alternatives --config x-session-manager
2. Install TigerVNC Server
sudo apt install tigervnc-standalone-server -y
Set a VNC password:
vncpasswd
Start the VNC server (display :1 → port 5901):
vncserver -localhost no :1
3. Configure Startup Script
Stop the running session:
vncserver -kill :1
Edit startup file:
nano ~/.vnc/xstartup
Example for XFCE:
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &
Make it executable:
chmod +x ~/.vnc/xstartup
Restart:
vncserver -localhost no :1
4. Secure with SSH Tunnel
On your local machine:
ssh -L 59000:localhost:5901 -C -N user@server_ip
Connect your VNC client to localhost:59000.
5. Auto-Start with systemd
Create service file:
sudo nano /etc/systemd/system/vncserver@.service
Example:
[Unit]
Description=Start TigerVNC server at startup
After=syslog.target network.target
[Service]
Type=forking
User=your_user
PIDFile=/home/your_user/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 -localhost no :%i
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target
Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable Email住址會使用灌水程式保護機制。你需要啟動Javascript才能觀看它 --now
Tip: For best performance, use XFCE or KDE Plasma over slower connections, and always tunnel VNC over SSH for security.
Step-by-step Installation (using TightVNC & XFCE)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Update System & Install Desktop Environment:
bash
sudo apt update
sudo apt install xfce4 xfce4-goodies
Select a display manager if prompted (e.g., LightDM).
Install VNC Server:
bash
sudo apt install tightvncserver
Set VNC Password:
bash
vncserver
Follow the prompts to create a password for your VNC sessions.
Configure xstartup File:
Stop the initial VNC instance: vncserver -kill :1
Edit the startup script: nano ~/.vnc/xstartup
Add these lines:
bash
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &
Make the file executable: chmod +x ~/.vnc/xstartup.
restart
vncserver -localhost no :1
Start VNC as a Service (Systemd):
Create the service file (replace your_user with your actual username):
bash
sudo nano /etc/systemd/system/vncserver@.service
Paste the service definition (adjusting User, PIDFile, ExecStart, WorkingDirectory for your user/system) and save.
ini
[Unit]
Description=Start TigerVNC server at startup
After=syslog.target network.target
[Service]
Type=forking
User=your_user
PIDFile=/home/your_user/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 -localhost no :%i
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target
Reload Systemd and enable/start the service:
bash
sudo systemctl daemon-reload
sudo systemctl enable Email住址會使用灌水程式保護機制。你需要啟動Javascript才能觀看它 # For display :1
sudo systemctl start Email住址會使用灌水程式保護機制。你需要啟動Javascript才能觀看它
Configure Firewall (UFW):
bash
sudo ufw allow 5901/tcp
sudo ufw enable
Connect: Use a VNC client (like TigerVNC Viewer, RealVNC Viewer) to connect to your_server_ip:1 (e.g., 192.168.1.100:1)
Disabling Tracker3 in Ubuntu
1
2
3
In Ubuntu with GNOME, Tracker3 is a file indexing service that scans your home directory to build a search index. While useful for quick file searches, it can cause high CPU usage and slowdowns, especially on systems with large codebases or shared network directories. Developers often choose to disable it to free system resources.
Step 1 – Stop and Reset Tracker3 Use the built-in Tracker3 management tool to stop all miners and clear existing indexes:
tracker3 reset -s -r
This will:
Stop all running Tracker3 processes.
Remove existing index databases.
Reset configuration to defaults.
You can verify the status with:
tracker3 daemon
It should show miners as Not running.
Step 2 – Permanently Mask Services Prevent Tracker3 from starting again by masking its systemd user services:
systemctl --user mask tracker-miner-fs-3.service \
tracker-extract-3.service \
tracker-miner-rss-3.service \
tracker-writeback-3.service \
tracker-xdg-portal-3.service
Masking links the service to /dev/null, making it impossible to start unless unmasked.
Step 3 – Remove Cache Data To reclaim disk space and remove any residual indexed data:
rm -rf ~/.cache/tracker3
rm -rf ~/.local/share/tracker3
Step 4 – Optional Global Disable If you want to disable Tracker3 for all users (including system accounts like gdm):
sudo systemctl --global mask tracker-miner-fs-3.service \
tracker-xdg-portal-3.service
Alternative – Make Tracker3 Idle Without Removal If you need GNOME search to remain functional but want minimal resource usage, adjust its settings:
gsettings set org.freedesktop.Tracker3.Miner.Files enable-monitors false
gsettings set org.freedesktop.Tracker3.Miner.Files crawling-interval -2
This effectively stops filesystem crawling while keeping the service installed.
Final Step – Reboot Reboot to ensure changes take effect:
sudo reboot
After reboot, tracker3 daemon should confirm no active miners, and CPU usage should remain low. This approach is clean, reversible, and avoids breaking GNOME dependencies.
Learn more:
1 -
blog.csdn.net
2 -
cloud.tencent.com
3 -
興趣班Studio 免費試堂 音樂課程 興趣班 畫畫班 工作坊 myClassStudio
https://www.facebook.com/foonfoonchoosehappiness/
![]()
手工輕黏土,店主心思作品 ,有保存記念價值🥳🎉歡迎來圖訂做.
冇現貨,最少7天或以上,決定好圖樣後, 來圖根據難易程度報價,免費報價😊手工製作必定跟來圖有差異是不可避免的,如介意免做, 所有製作都是由本店主手工完成的,故請不要催單,慢工出細貨。
確定有圖樣 ,製作$200起,先下訂金50%,面交收再付餘數50%,過程中會拍片和圖片給你,製作過程中如不影響前期已完成的部份,可作少改圖一次。
輕黏土作品絶對🙅♂️不可沾水💦, 用透明展示箱收藏更好, 配件掉下可以用白膠漿再黏上. 基本上是可永久保存的🎉🥳🥰。
或歡迎興趣班中心,可PM我合作課程。
https://www.facebook.com/profile.php?id=100094419195556&mibextid=ZbWKwL
![]()
【復活節孵雞蛋小盒子】
親子輕黏土工作坊![]()
就嚟到復活節啦~ ![]()
![]()
![]()
大家知唔知點解雞蛋係復活節嘅其中象徵呢?![]()
快啲嚟參加我哋嘅工作坊啦,一齊聽聽復活節嘅故事,一齊狩獵復活節彩蛋啦!
早鳥優惠:$288 (原價:$388)
*費用已包括課程及所需材料費
*費用為一位成人及一位兒童
適合3-12歲小朋友 |位置有限,先到先得
工作坊內容:
親手製作屬於自己獨一無二的孵蛋盒
聽聽復活節的小故事
狩獵復活節彩蛋
小朋友得着:
訓練小手肌
上色、混色技巧
訓練觀察能力
與家人及其他小朋友共度歡樂時光
活動詳細:
對象:3-12歲兒童及家長
日期:
4月3日(星期一)
4月4日(星期二)
時段:
.13:30-14:45
.15:00-16:15
.16:30-17:45
費用:$288
地點:葵興(留白畫室)
條款及細則:
*優惠只適用於 16-31/12/2022 期間之預約
*所有優惠不可與其他優惠,折扣同時使用
*留白畫室保留最終決定權*
歡迎資訊索取更多資料。
WhatsApp: wa.me/85264913790
https://www.facebook.com/profile.php?id=100086005028947
𝐖𝐡𝐢𝐭𝐞 𝐜𝐚𝐧𝐯𝐚𝐬 留白畫室
![]()
薄餅製作工作坊 (柴火烤)
柴火Pizza工作坊🍕🔥
每個pizza 大約10寸左右,
其實形狀及大小都是由你自己發揮的🥰👍🏼
工作坊需時60-90分鐘
成人:一人製作一個pizza🍕
親子:一位家長+一位小朋友去製作一個pizza🍕
歡迎查詢🙏🏼
生活農莊電話☎️ 6999-8006
一按即可連到What’s app ⬇️
http://wa.me/85269998006
生活農莊設有以下嘅工作坊
1️⃣農耕體驗工作坊
2️⃣自助畫廊小畫家Acrylic工作坊小勞作
3️⃣薄餅製作工作坊 (柴火烤)
4️⃣菠蘿果醬製作
5️⃣天然潤唇膏工作坊
6️⃣ 製作環保酵素工作坊
生活農莊是家庭式經營,
以有機種植為主,租田給大家去耕種。
提供一個舒適、寫意、療癒、減壓的好地方給種植者使用💕
如果你都想體驗有機耕種,歡迎你加入我哋「生活農莊」嘅大家庭啊!
@生活農莊
-Living Farm Art Gallery
🎨生活農莊自助畫廊🖼
-Living Workshop 🍕生活工作坊💄
-LuLu Kitchen 🍗LuLu廚房🥘
-Living Farm 🌱生活農莊🌱
🌱生活農莊地址:
新界大埔泰亨村199號
No.199 Tai Hang Tsuen, Tai Wo Service Road West, Tai Po, Tai Po
⬇️地圖⬇️
https://maps.app.goo.gl/AouJ6u95xzhJ7s2A9
#自助畫廊 #減壓 #療癒 #遠離繁囂
#生活農莊 #舒緩情緒 #畫畫
#填色減壓 #我的秘密花園 #LivingFarmArtGallery #耕種體驗 #放鬆 #享受 #生活 #Lifestyle #親子活動 #親子好去處 #租田 #耕種樂趣 #親子工作坊 #有機蔬菜 #假日好去處 #工作坊 #做pizza #薄餅 #pizza #薄餅工作坊
#親親大自然 #有機耕種 #薄餅製作工作坊柴火烤
![]()
✨歡迎租場/合作夥伴
✅適合排舞/瑜珈班等
✅獨立廁所
✅藍芽音樂
✅拍攝電話架
✅位置方便 屯門西鐵站出口步行1分鐘
星期一至五(06:00 -18:00)
$150/hr
星期一至五(18:00-00:00)
$110hr
星期六/日及公眾假期(全日)
$200/hr
查詢🔍6180 0680
![]()
<<聖誕咭工作坊>>
聖誕咭親手畫, 意義更大, 收到的親戚朋友更開心😍😍親子/情侶/知己一齊繪製聖誕咭, 特別窩心。🥰🥰
上課地點: 尖沙咀/沙田
上課時間: 每堂2小時
學費: HK$580 (包印製30張聖誕咭)
😍😍Early bird 優惠:😍😍
10月31日前報11月上課8折優惠
11月5日前報11月上課85折優惠
報名今查詢請whatsapp: 94039747
![]()
本人考獲倫敦聖三一學院單簧管及色士風演奏文憑(ATCL), 英國皇家音樂學院單簧管、色士風及樂理8級, 前香港青年管樂團成員, 曾多次代表香港到海外演出。
現全職任教單簧管及色士風, 10年教學經驗, 任教於多間中小學, 學生多來自中小學名校或國際學校, 由4歲至中年不等。屢次有學生於校際音樂節獨奏項目取得冠軍及於英國皇家音樂學院考試取得卓越成績。
歡迎任何年齡及程度之學生, 可上門到各區授課, 有意者歡迎查詢。
鄭安兒老師
Miss Annie Cheng












