A collection of Ubuntu snippets.
Last active
December 5, 2023 19:40
-
-
Save ethauvin/424470046b37008bd77a6a2047bc0cb4 to your computer and use it in GitHub Desktop.
ubuntu snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install held back pakages | |
apt --with-new-pkgs upgrade <list of packages> | |
# Force install pacakge | |
apt download <package> | |
dpkg --force-all -i ./<package.deb> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Purge old config files | |
aptitude purge ?config-files | |
aptitude purge ~c | |
# Search only installed packages | |
aptitude search '~i keyword' | |
# Search descriptions | |
aptitude search '~d keyword' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo pkill --oldest chrome |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
duply cfg_name status | |
duply cfg_name list | |
duply cfg_name fetch /etc/passwd /root/pw 4D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fail2ban-client set YOURJAILNAMEHERE unbanip IPADDRESSHERE | |
fail2ban-client get YOURJAILNAMEHERE ignoreip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dpkg-reconfigure lightdm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ocrmypdf -c -d -s -r -O 3 foo.pdf bar.pdf | |
pdftoppm input.pdf outputname -png -f {page} -singlefile | |
pdftotext -layout input_file.pdf [output.pdf] | |
tabula -o output.csv input.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# upgrade package | |
pip install <package_name> --upgrade | |
pip install <package_name> -U |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List rules | |
ufw status | |
ufw status verbose | |
ufw status numbered | |
# Add/Remove rules | |
ufw allow 1234/tcp | |
ufw delete allow 1234/tcp | |
# List available apps | |
ufw app list | |
# Add / Remove app | |
ufw allow <appname> | |
ufw delete allow <appname> | |
# Add / Remove app LAN only | |
ufw allow from 10.0.0.0/24 to any app <appname> | |
ufw delete allow from 10.0.0.0/24 to any app <appname> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update-alternatives --install /usr/bin/editor editor /usr/bin/vim 100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment