apt clean â cleans the packages and install script in /var/cache/apt/archives/ (removes all stored archives in your cache)
apt autoclean â cleans obsolete deb-packages, less than clean (removes all stored archives in your cache for packages that can not be downloaded anymore (thus packages that are no longer in the repo or that have a newer version in the repo))
apt autoremove â removes orphaned packages which are not longer needed from the system, but not purges them, use the --purge option together with the command for that.
apt --purge autoremove â remove config files and (more important as it cleans dead subdirectories from the documentation tree) entries from /usr/share/doc.
Create Aliases
Ubuntu:
nano~/.bashrc# Append the following text with personal commands. O.S. update in this case:alias updateos='sudo -- sh -c "sudo apt update && sudo apt -y upgrade && sudo apt -y autoremove"'# Load changes:source~/.bashrc# List all aliases:alias
Kali Linux:
nano~/.zshrc# Append the following text with personal commands. O.S. update in this case:alias updateos='sudo -- sh -c "sudo apt update && sudo apt -y upgrade && sudo apt -y autoremove"'# Load changes:source~/.zshrc# List all aliases:alias
sudoaptinstall-ychrony# You can configure which time servers you want to use by editing # nano /etc/chrony/chrony.confsudosystemctlenable--nowchronysudosystemctlstatuschrony--no-pagersudotimedatectlstatus# System clock synchronized: yes# NTP service: active
Set Keyboard layout
sudodpkg-reconfigurekeyboard-configuration
Install packages (deb, etc)
sudodpkg-ipackname
First settings after O.S. install
passwdrootpasswdkalisudoaptinstallterminator-ysudoupdate-alternatives--configx-terminal-emulator# gsettings set org.gnome.desktop.default-applications.terminal exec 'terminator'
Set grub boot menu timeout
sudonano/etc/default/grub# Set the seconds in the GRUB_TIMEOUT value, save and exit the fileGRUB_TIMEOUT=1sudoupdate-grub# Reboot to test the timeout# To instantly boot without the grub menu waiting, edit the file adding these lines:GRUB_HIDDEN_TIMEOUT=0GRUB_HIDDEN_TIMEOUT_QUIET=trueGRUB_TIMEOUT=0
Boot Partition Clean Up (Ubuntu/Debian)
# Check Current Kernel Versionsudouname-r# Example output: 5.4.0-64-generic# As you see on image in my case â 5.4.0-64-generic is current kernel. Other older kernel versions can be deleted.# List Old installed Kernel images:sudodpkg--list'linux-image*'|awk'{ if ($1=="ii") print $2}'|grep-v`uname-r`# Your output will something like:linux-image-5.4.0-39-genericlinux-image-5.4.0-42-genericlinux-image-5.4.0-54-genericlinux-image-5.4.0-64-generic# To cleanup boot partition in Ubuntu uninstall old kernels with apt command one by one:sudoapt-getpurgelinux-image-5.4.0-39-genericsudoapt-getpurgelinux-image-5.4.0-42-genericsudoapt-getpurgelinux-image-5.4.0-54-generic# Remove no longer used dependencies:sudoapt-getautoremove# Update GRUB:sudoupdate-grub
Change Console setup
# For italian keyboard:sudodpkg-reconfigureconsole-setup
Disable Ubuntu automatic updates
sudonano/etc/apt/apt.conf.d/20auto-upgrades# make sure all the directives are set to â0âsudosystemctldisableapt-daily-upgrade.timersudosystemctlmaskapt-daily-upgrade.servicesudosystemctldisableapt-daily.timersudosystemctlmaskapt-daily.service# For complete package uninstallsudoaptpurge--auto-removeunattended-upgrades
# Start the Pc# Press E in the grub menu# Find the "linux /...vmlinuz" kernel line# Add "init=/bin/bash" at the end of the line# Press CTRL+X to boot.# In root prompt, type mount-oremount,rw/# Set a new password for a user withpasswduser# or for the root user withpasswd# Rebootreboot-f
Check Hardware Temperatures
sudoaptinstalllm-sensorshddtempsudosensors-detect/etc/init.d/kmodstartsensors# Raspberry Pi Tempvcgencmdmeasure_temp
# orwget -qO - https://apt.packages.shiftkey.dev/gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/shiftkey-packages.gpg > /dev/null
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/shiftkey-packages.gpg] https://apt.packages.shiftkey.dev/ubuntu/ any main" > /etc/apt/sources.list.d/shiftkey-packages.list'
sudoaptupdate&&sudoaptinstallgithub-desktop
Install Telegram
# Via aptsudoaptinstalltelegram-desktop
# Via official Linux binarywgethttps://telegram.org/dl/desktop/linuxtar-xvflinuxsudomvTelegram//opt/opt/Telegram/./Telegram/opt/Telegram/./Updater
Install Anydesk
# Run the following commands as root user:# add repository key to Trusted software providers listwget-qO-https://keys.anydesk.com/repos/DEB-GPG-KEY|apt-keyadd-# add the repository:sudoecho"deb http://deb.anydesk.com/ all main">/etc/apt/sources.list.d/anydesk-stable.list# update apt cache:sudoaptupdate# install anydesk:sudoaptinstall-yanydesk
Install ForticlientVPN
sudoaptinstallfirefoxjqlz4jsonopenfortivpncdmkdirtoolscd~/toolsgitclonehttps://github.com/nonamed01/fuckForticlient.gitcd~/tools/fuckForticlient./fuckForticlient.sh-S<SERVER>:<PORT>-c# Login via browser and retry the command above after logged in
sudoaptinstall-ytorservicetorstartservicetorstatus-------------------------Startbrowserwithproxychain:proxychainsfirefoxwww.duckduckgo.com (do not close terminal)searchfor:checkdnsleaks
Install Anonsurf
cd /tmp
git clone https://github.com/Und3rf10w/kali-anonsurf
cd kali-anonsurf/
./installer.sh
clear
cd
anonsurf --help
anonsurf start
anonsurf myip
cd /opt/
# Get the latest version link from https://github.com/gophish/gophish/releases/
sudo wget https://github.com/gophish/gophish/releases/download/v0.12.1/gophish-v0.12.1-linux-64bit.zip
sudo unzip -d gophish gophish-v0.12.1-linux-64bit.zip
sudo chmod +x gophish/gophish
cd /opt/gophish && sudo ./gophish
docker run -it --rm --name rustscan rustscan/rustscan:2.1.1
# Create a zsh/bash alias like this
alias rustscan='docker run -it --rm --name rustscan rustscan/rustscan:2.1.1'
sudo apt install -y golang-go
go install github.com/projectdiscovery/cvemap/cmd/cvemap@latest
# Based on your SHELL, add Go bin to system PATH
echo "export PATH=$PATH:$HOME/go/bin" >> $HOME/.bashrc
echo "export PATH=$PATH:$HOME/go/bin" >> $HOME/.zshrc
echo "export PATH=$PATH:$HOME/go/bin" >> $ZSH_CUSTOM/my_paths.zsh
source $HOME/.bashrc
source $HOME/.zshrc
Usage and Configuration
SSH Login
sudo systemctl enable ssh --now
Configure Git for Github
git config --global user.email "YOUR_EMAIL@gmail.com"
git config --global user.name"YOUR_USERNAME"
ssh-keygen -t ed25519 -C "YOUR_EMAIL@gmail.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
xclip -selection clipboard < ~/.ssh/id_ed25519.pub
# Add a new key on github.com and paste the one copied with xclip.
# Test it:
ssh -T git@github.com
git clone git@github.com:syselement/REPOSITORY.git
Proxychains
#Edit proxychains:
nano /etc/proxychains.conf
# uncoment dynamic_chain
# coment strict_chain
# uncoment Proxy DNS requests-no leak for DNS data
# add on proxylist: socks5 127.0.0.1 9050
OpenVpn
# TryHackme OpenVpn Cypher(Temporary) error fix
sed -i 's/cipher AES-256-CBC/data-ciphers AES-256-CBC/' yournickname.ovpn
# or
sudo nano yournickname.ovpn
# Substitute line 14 "cipher AES-256-CBC" with:
data-ciphers AES-256-CBC
# Launch openvpn connection in background as a daemon
sudo openvpn --config yournickname.ovpn --daemon
# Stop it
sudo pkill -f openvpn
#!/bin/bash
echo "[i] Updating and upgrading Kali (this will take a while)"
apt-get update
apt-get --yes --force-yes dist-upgrade
echo "[i] Installing Xfce4 & xrdp (this will take a while as well)"
apt-get --yes --force-yes install kali-desktop-xfce xorg xrdp
echo "[i] Configuring xrdp to listen to port 3390 (but not starting the service)"
sed -i 's/port=3389/port=3390/g' /etc/xrdp/xrdp.ini
Fix for Authentication Required to Create Managed Color Device, run
cat <<EOF | sudo tee /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla
[Allow Colord all Users]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
ResultAny=no
ResultInactive=no
ResultActive=yes
EOF
sudo systemctl restart xrdp
Port to connect to is 3390
### TESTS - DO NOT CONSIDER ###
# sudo nano /etc/xrdp/startwm.sh
# # Add lines before test and execute
# unset DBUS_SESSION_BUS_ADDRESS
# unset XDG_RUNTIME_DIR
# . $HOME/.profile
Happens on Kali and Parrot OS with HDMI external monitor and Iris Xe Graphics.
sudo cat /sys/kernel/debug/dri/0/i915_dmc_info
# Verifica la versione e annotarsela
ls -lah /usr/lib/firmware/i915/adlp_dmc*
# Rinominare i file per rendere la versione utilizzata la 2.16 tramite il file adlp_dmc.bin
sudo mv /usr/lib/firmware/i915/adlp_dmc.bin /usr/lib/firmware/i915/adlp_dmc_ver<VERSIONE_PRIMO_COMANDO>.bin
sudo cp /usr/lib/firmware/i915/adlp_dmc_ver2_16.bin /usr/lib/firmware/i915/adlp_dmc.bin
sudo update-initramfs -c -k all
# Verificare la version utilizzata (puÃ˛ essere necessario un reboot)
sudo cat /sys/kernel/debug/dri/0/i915_dmc_info