Install Windows Subsystem for Linux (WSL) on Windows 11
wsl --install
wsl --list --online
wsl --install -d Ubuntu
wsl --update
wsl --install
wsl --list --online
wsl --install -d Ubuntu
wsl --update
ip route add 192.168.72.20/32 dev eth3
Do not forgetĀ via <gateway_ip>
if the target IP is not directly reachable.
ip route add 44.5.134.90/32 via 192.168.1.1 dev eth3
sudo apt install shc
Compile script file using shc
shc -f hello.sh
Check generated files
ls -l hello* -rw-rw-r-- 1 user user 29 Mar 14 07:37 hello.sh -rwxrwxr-x 1 user user 14960 Mar 14 07:39 hello.sh.x -rw-rw-r-- 1 user user 10047 Mar 14 07:39 hello.sh.x.c
.sh
is the original script.
sh.x
is the compiled binary.
.sh.x.c
is the C source code generated from the .sh
file prior to compiling to .sh.x
.
hello.sh.x
permission is automatically set as executable
Rename executable
mv hello.sh.x hello
Check file execution
./hello Alice
Download Firefox from Firefox Download Page
tar xjf firefox-*.tar.bz2
mv firefox /opt
Create a symlink to the Firefox executable:
ln -s /opt/firefox/firefox /usr/local/bin/firefox
Create a .desktop
file for firefox :
touch ~/.local/share/applications/firefox.desktop # or touch /usr/local/share/applications/firefox.desktop
and paste these lines there:
[Desktop Entry] Version=1.0 Name=Firefox Web Browser Comment=Browse the World Wide Web GenericName=Web Browser Keywords=Internet;WWW;Browser;Web;Explorer Exec=firefox %u Terminal=false X-MultipleArgs=false Type=Application Icon=/opt/firefox/browser/chrome/icons/default/default128.png Categories=GNOME;GTK;Network;WebBrowser; MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall; StartupNotify=true
Logout and login again
References
https://support.mozilla.org/en-US/kb/install-firefox-linux
sudo nano /etc/fstab
Edit the mounting options for your partitions by adding the text noatime
and nodiratime
to the lines defining your root (/
) and other partitions if you have them (/home)
# / was on /dev/sda2 during installation UUID=587e0dc5-2db1-4cd9-9792-a5459a7bcfd2 / ext4 noatime,nodiratime,errors=remount-ro 0 1 # /home was on /dev/sda3 during installation UUID=2c919dc4-24de-474f-8da0-14c7e1240ab8 /home ext4 noatime,nodiratime,defaults 0 2
References
https://askubuntu.com/questions/1400/how-do-i-optimize-the-os-for-ssds
make sure that the SSD in your computer supports TRIM
sudo hdparm -I /dev/sda # or sdb
Find “Data Set Management TRIM supported”.
Clean up the root partition of the SSD
sudo fstrim -v /
References
https://www.maketecheasier.com/enable-trim-for-ssd-in-ubuntu/
curl https://api.cloudflare.com/client/v4/ | json_pp
References
https://mkyong.com/web/how-to-pretty-print-json-output-in-curl/
https://manpages.ubuntu.com/manpages/trusty/man1/json_pp.1.html
curl --connection-timeout 5 https://reqbin.com/echo
curl https://reqbin.com/echo -A "ReqBin Curl Client/1.0"
References
https://reqbin.com/req/c-ekublyqq/curl-user-agent
curl -H "Origin: https://example.reqbin.com" https://reqbin.com/echo
References
https://reqbin.com/req/c-taimahsa/curl-cors-request