https://www.howtogeek.com/117435/htg-explains-the-linux-directory-structure-explained/
Install Anbox on Fedora: https://www.linuxadictos.com/en/instala-y-ejecutar-aplicaciones-de-android-con-anbox-en-fedora-30.html
When it’s not possible to install a deb file directly with apt (apt install ./file.deb), create this:
#!/bin/bash
# Save this script as "inst" and make it executable.
# Then copy it into /usr/local/bin/
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <path-to-deb-file>"
exit 1
fi
sudo apt install ./"$1"- Arch Cheat Sheet: https://github.com/Stickano/ArchCheatSheet
- Automated install: https://www.debugpoint.com/archinstall-guide
- Yay install: https://www.makeuseof.com/install-and-use-yay-arch-linux
- pacman's Pac-Man-style progress bar: In
/etc/pacman.confunder#OptionsaddILoveCandy - CUDA installation: LinuxTipsSubPages/CUDA-ArchLinux.md
- Disable IPv6: LinuxTipsSubPages/DisableIPv6onArchLinux.md
- Blackarch on Arch: https://philosophos.github.io/articles/20170305~Installing-BlackArch-on-top-of-ArchLinux/
- Blackarch on Arch / Solve conflicts:
sudo pacman -Syu blackarch --overwrite '*' - Bluetooth install: https://www.jeremymorgan.com/tutorials/linux/how-to-bluetooth-arch-linux
- Dababase locked: https://wiki.archlinux.org/title/pacman#%22Failed_to_init_transaction_(unable_to_lock_database)%22_error
- Devel packages:
sudo pacman -S --needed base-devel - iwctl (command line wifi management): https://man.archlinux.org/man/community/iwd/iwctl.1.en
- key init: https://bbs.archlinux.org/viewtopic.php?id=143337
- Pamac install: https://www.fossmint.com/pamac-arch-linux-gui-package-manager
- KVM/Virt-Manager install: https://computingforgeeks.com/install-kvm-qemu-virt-manager-arch-manjar
- Sway tweaks for Arch Linux: https://gist.github.com/cryptrz/6f2b48d6cc917497b648c54c3429407c
https://linux.die.net/man/8/aureport)
-
Successful logins:
ausearch --message USER_LOGIN --success yes --interpret -
Failed logins:
ausearch --message USER_LOGIN --success no --interpret-messageis followed by the message we are interested in searching for. Examples includeUSER_LOGIN,DEL_USER,ADD_GROUP,USER_CHAUTHTOK,DEL_GROUP,CHGRP_ID,ROLE_ASSIGN, andROLE_REMOVE.-successis followed byyesornodepending on whether you are searching for successful or unsuccessful attempts, respectively.-interpretconverts numeric entities, such as UID (User ID), into text.
Successful logins:
ausearch --message USER_LOGIN --success yes --interpret | grep ct=rootFailed logins:
ausearch --message USER_LOGIN --success no --interpret | grep ct=root
-
Clear cache:
1. Clear PageCache only.
sync; echo 1 > /proc/sys/vm/drop_caches2. Clear dentries and inodes.
sync; echo 2 > /proc/sys/vm/drop_caches3. Clear pagecache, dentries, and inodes.
sync; echo 3 > /proc/sys/vm/drop_caches
Arch and Ubuntu 24.04 installation
ClamAV installation and setup on Debian/Ubuntu
- Permanently change DNS on Ubuntu and Debian: https://www.tecmint.com/set-permanent-dns-nameservers-in-ubuntu-debian/
- Add an open port
firewall-cmd --zone=public --add-port=2237/tcp- Command for shortcut:
/usr/bin/flameshot gui
- https://www.networkworld.com/article/968831/5-ways-to-examine-the-content-of-files-on-linux.html
- https://opensource.com/article/20/4/linux-binary-analysis
- Touchpad 3 fingers with Xorg/X11: https://itsfoss.com/three-finger-swipe-gnome
-
Touchpad “Tap to click” + “Natural screen”:
- Copy/paste all of this in the terminal:
sudo mkdir -p /etc/X11/xorg.conf.d && sudo tee <<'EOF' /etc/X11/xorg.conf.d/90-touchpad.conf 1> /dev/null Section "InputClass" Identifier "touchpad" MatchIsTouchpad "on" Driver "libinput" Option "Tapping" "on" EndSection EOF
- Manual install:
- Before following this steps, install this:
sudo apt install build-essential libssl-dev yasm libgmp-dev libpcap-dev libnss3-dev libkrb5-dev pkg-config libbz2-dev zlib1g-dev- For NVIDIA support:
sudo apt install nvidia-cuda-toolkit nvidia-opencl-dev - For AMD support:
sudo apt install fglrx-updates-dev
Jq (Command-line Json processor)
-
CLI layout command (exemple for US International Dead Keys):
setxkbmap -layout us -variant intl
-
apt update and upgrade not working: https://forums.kali.org/showthread.php?70575-Apt-update-and-upgrade-commands-not-working
echo "deb [http://http.kali.org/kali](http://http.kali.org/kali) kali-last-snapshot main contrib non-free" | sudo tee /etc/apt/sources.list
-
Enable copy-paste on guest (already enabled automatically on host):
sudo apt install spice-guest-tools spice-vdagent- Check if network is active:
sudo virsh net-start default - If network is not active:
sudo virsh net-start default - Enable network auto-start:
sudo virsh net-autostart default
-
Import OVA:
- Extract the files:
tar xvf <image_name>.ova - Coonvert System.vmdk to qcow2:
qemu-img convert -O qcow2 <image_name>.vmdk /path/to/folder/OL7U2.qcow2
- Extract the files:
-
Enable Bridge Adapter:
-
Convert .ova to qcow2:
tar xvf MyAppliance.ovaqemu-img convert -O qcow2 extractedFile.vmdk newFile.qcow2
- To empty the memory buffer and cache, execute the following command,
free && sync && echo 3 > /proc/sys/vm/drop_caches && free- Error: could not insert ‘vboxdrv’: Operation not permitted: https://crazytechgo.com/modprobe-error-could-not-insert-vboxdrv-operation-not-permitted
sudo ntpdate [pool.ntp.org](http://pool.ntp.org/)
Sunstone: GUI
Port 2616/tcp if not proxied
Default user: oneadmin
wget'https://github.com/OpenNebula/minione/releases/latest/download/minione'
sudo bash minione
source: https://github.com/OpenNebula/minione
Install OpenVAS on Ubuntu/Debian
- Check open ports:
sudo netstat -tulpn | grep LISTEN
-
Manual install:
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev curltar -xf Python-3.?.?.tar.xzcd Python-3.*./configuresudo make install
-
Externally Managed Environment error
pip3 install XXXXX **--break-system-packages**
-
Under voltage alert:
sudo vim /boot/config.txtand add this:avoid_warnings=1
-
WiFi manual settings:
- Create the file wpa_supplicant.conf in the root of the /boot partition (adapt ssid and psk):
country=RO
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid=**<NETWORK NAME>**
scan_ssid=1
psk=**<PASSWORD>**
key-mgmt=WPA-PSK
}- List installed packages: https://linoxide.com/list-installed-packages-fedora
Install Rustdesk on Debian/Ubuntu
- https://manpages.ubuntu.com/manpages/noble/man1/subuser.1.html
- https://www.man7.org/linux/man-pages/man1/Firejail.1.html
- Change default port (example for SSH from 22 to 2237)
semanage port -a -t ssh_port_t -p tcp 2237
semanage port -l | grep ssh
systemctl restart sshd.servicesudo apt update
sudo apt install spice-vdagent spice-webdavd qemu-guest-agent
sudo reboot
- Tilix error: https://gnunn1.github.io/tilix-web/manual/vteconfig
sudo apt install tor
sudo nano /etc/tor/torrc
Uncomment this 2 lines:
HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:80
sudo service tor stop
sudo service tor start
sudo service tor status
sudo systemctl start tor
sudo systemctl status tor
Check the website URL:
sudo cat /var/lib/tor/hidden_service/hostname (RPi OS)
sudo cat /var/lib/tor/other_hidden_service/hostname (Fedora)
RPi OS:
sudo apt install nginx
sudo service nginx start
sudo service nginx status
Fedora:
sudo systemctl start nginx
sudo systemctl status nginx
-
------------------------------------(RPi OS only)----------------------------
sudo nano /etc/nginx/nginx.confUncomment:
server_tokens off;server_name_in_redirect off;Add this line:
port_in_redirect off;sudo service nginx restart(RPi OS)sudo systemctl restart nginx
cd /var/www/html/ (RPi)
cd /usr/share/nginx/html/ (Fedora)
sudo rm index.nginx-debian.html (RPi)
sudo rm index.html (Fedora)
sudo nano index.php
Add some HTML code, a "hello world" or something: (...)
sudo service restart nginx
Copy/paste the onion URL in Tor browser and check the website
PHP install: How to Install PHP on Raspberry Pi with NGINX (themoderncoder.com)
sudo apt-get install gridsite-clients
Example: urlencode "http://example.com/?param=linux+url+encoder"
Output: http%3A%2F%2Fexample.com%2F%3Fparam%3Dlinux%2Burl%2Bencoder
- https://www.man7.org/linux/man-pages/man5/nologin.5.html
- Managing_Smart_Cards/Pluggable_Authentication_Modules
Command-line connexion:
- Find the networkds around:
nmcli dev wifi - Connect to a network:
nmcli dev wifi connect <SSID>
Driver install for AC1300 USB adapter (option 2, works for Kali/Debian-based and Fedora):
Driver install for AC1300 USB adapter (option 3):
Driver install for AWUS1900 on Kali:
Driver install for AC600 USB adapter: