sudo apt update
sudo rm /etc/apt/preferences.d/nosnap.pref
sudo apt install snapd
sudo snap install whatsdesk
to run the app:
whatsdesk
ctrl+c to exit
to uninstall:
sudo snap remove whatsdesk
sudo apt purge snapd
Tag: Linux
How to install whatsapp on linux ubuntu/mint
How to Keep Your Telegram Bot Shop Running After Reboot Automatically
sudo useradd -r -m -d /srv/telegram-bot -s /usr/sbin/nologin telegram-bot
sudo chown -R telegram-bot:telegram-bot /srv/shopbot
sudo chmod 750 -R telegram-bot /srv/shopbot
sudo nano /etc/systemd/system/telegram-bot.service
[Unit]
Description=Telegram Bot Service
After=network.target
[Service]
User=telegram-bot
Group=telegram-bot
WorkingDirectory=/srv/shopbot
ExecStart=/srv/shopbot/venv/bin/python -OO /srv/greed/bot.py
Restart=always
RestartSec=5
Environment="PYTHONUNBUFFERED=1"
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now telegram-bot
sudo systemctl status telegram-bot
debugging & logs
journalctl -u telegram-bot -f
sudo systemctl restart telegram-bot
Install WordPress Locally on Linux (Step-by-Step Guide)
HOST NAME
sudo nano /etc/hostname
sudo nano /etc/hosts
ping / nslookup
sudo systemctl restart systemd-logind.service
source /etc/hostname
hostnamectl
UPDATE THE SYSTEM
sudo apt update
sudo apt full-upgrade
sudo reboot
INSTALL APACHE
sudo apt install apache2
systemctl status apache2
sudo lsof -i :80
check in broweser
#INSTALL MariaDB
sudo apt install mariadb-server
# Secure MariaDB (optional but recommended)
sudo mysql_secure_installation
# Access MariaDB shell
sudo mariadb
#Then, inside the MariaDB prompt:
CREATE DATABASE cp_breeze_wordpress_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'cp_breeze_wordpress_user'@'localhost' IDENTIFIED BY 'cp-breeze-pw';
GRANT ALL ON cp_breeze_wordpress_db.* TO 'cp_breeze_wordpress_user'@'localhost';
FLUSH PRIVILEGES;
QUIT;
DOWNLOAD WORDPRESS:
sudo apt install unzip wget
sudo wget https://wordpress.org/latest.zip
sudo unzip latest.zip
sudo chown -R www-data:www-data wordpress/
sudo mv wordpress /var/www
CONFIGURE APACHE:
sudo nano /etc/apache2/sites-available/wordpress.conf
<VirtualHost *:80>
DocumentRoot /var/www/wordpress
<Directory /var/www/wordpress>
Options FollowSymLinks
AllowOverride All
DirectoryIndex index.php
Require all granted
</Directory>
<Directory /var/www/wordpress/wp-content>
Options FollowSymLinks
Require all granted
</Directory>
</VirtualHost>
#Enable and reload Apache:
sudo a2dissite 000-default.conf
sudo a2ensite wordpress.conf
#install these packaged:
sudo apt install \
php-mysql php-xml php-curl php-zip \
php-mbstring php-soap php-intl \
php-xmlrpc php-gd libapache2-mod-php
#to make sure it reload all the new changes
sudo a2ensite wordpress.conf
sudo systemctl restart apache2
sudo systemctl status apache2
How to Create Your Own VPN Server on Linux Mint, Ubuntu, Debian (WireGuard on Linux)
#SERVER SIDE:
sudo apt update -y
sudo apt upgrade -y
sudo apt install wireguard -y
sudo wg genkey | tee privatekey | wg pubkey > publickey #will genarate public & private keys
ls
cat privatekey #(do not share with anybody!)
sudo nano /etc/wireguard/wg0.conf #wireguard configuration file
[Interface]
PrivateKey=<server-private-key>
Address=<server-ip-address>/<subnet> # make sure there isn't same subnet configured on one of the other psychical interfaces
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o <public-interface> -j MASQUERADE;
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o <public-interface> -j MASQUERADE;
ListenPort = 51820 # this the defuoult UDP port, but you can changed to any port if it's blocked.
[Peer] #client info
PublicKey = <client public-key>
AllowedIPs = <client IP/mask> # for example 10.0.0.2/32
#(any change to the conf file, need to run wg-quick down wg0 first then wg-quick up wg0 after the editing)
sudo wg-quick up wg0 #Starts the WireGuard VPN interface named wg0
sudo wg #Shows the current status of all active WireGuard interfaces and their peers
ip link # Lists all network interfaces and their statuses
wg show #Displays detailed status information for all active WireGuard interfaces,
CLIENT SIDE:
sudo apt update -y
sudo apt upgrade -y
sudo apt install wireguard -y
sudo wg genkey | tee privatekey | wg pubkey > publickey #will generate public & private keys
cat privatekey #(do not share with anybody!)
ls
sudo nano /etc/wireguard/wg0.conf
[Interface]
PrivateKey=<client-private-key>
Address=<client-ip-address>/<subnet> # make sure there isn't same subnet configured on one of the other pychical intefaces
DNS = 1.1.1.1, 2606:4700:4700::1111 # Optional: Cloudflare IPv4 and IPv6 DNS
[peer] #server info
Publickey=<Server Public Key>
Endpoint=<Server IP>:<port> # should be static public IP - reachble
AllowedIPs = 0.0.0.0/0, ::/0
PersistentKeepalive=60 #sending keep alive to keep the tunnel opened
CLIENT SIDE:
sudo wg-quick up wg0 #Starts the WireGuard VPN interface named wg0
sudo wg #Shows the current status of all active WireGuard interfaces and their peers
ip link # Lists all network interfaces and their statuses
wg show #Displays detailed status information for all active WireGuard interfaces,
ping to the server ip address
SERVER SIDE
#Enagle routing forward traffic from VPN network to internet.
sudo nano /etc/sysctl.conf
net.ipv4.ip_forward=1
net.ipv6.conf.all.forwarding=1
sudo sysctl -p # apply changes and make it permanent
#check that traffic acutely routing to the internet
sudo tcpdump -envi wg0 host 8.8.8.8
#enable wiregaurd on boot (client and server)
sudo systemctl enable wg-quick@wg0
systemctl status wg-quick@wg0
#check that clocks synced
timedatectl
#check routing table on server & client
ip route
#Check location
curl ipinfo.io