A List of Common Commands, Procedures, and Information.
A personal reference sheet (easy copy/paste) and script repository for everything from typical fresh-install commands to complete configurations. Mostly setup for my own use, but feel free to add a pull request if there's anything that should be added or changed.
Found an issue with a command, script, or even just some spelling, and aren't able to correct it and submit a pull request yourself?
Log it as an issue, and someone will eventually fix it (likely me).
Something you want to see added, but have no clue how to add it because GitHub is like some advanced nanobiotechnology to you?
Log it as an issue, and someone smarter than you will either add it or tell you they don't care because you're an unsupported lifeform and they haven't updated to the latest version of empathy yet.
Know how to work GitHub like your neighbor works your significant other while you're away at work? Great!
If it's minor, add it right in to the file and submit a pull request on the revision.
Big addition, or change? Fork the whole darn thing and make your changes from the comfort of your own repository before submitting a pull request. Or just keep it to yourself and steal the whole reference sheet, because your parents never loved you as a child, and it's the only way you can feel satisfied anymore.
This set of common commands are used more frequently, especially when working with a newly installed system. For specific use-case commands, check the corresponding section. If a command is missing here, and seems like it would be beneficial to add, create a pull request to add the changes.
Update, upgrade, clean:
yum update -y && yum upgrade -y && yum autoremove -y && yum clean all
Install Epel, update, upgrade, clean:
yum install -y epel-release && yum update -y && yum upgrade -y && yum autoremove -y && yum clean all
Basic tools install: yum install -y wget nano htop bzip2 zip unzip screen
Extra tools install: yum install -y atop nload smartmontools java
Upgrade from minimal install: yum groupinstall "Base"
List jails (Fail2Ban): fail2ban-client status
List banned IPs in single jail (Fail2Ban): fail2ban-client status JAIL
List all banned IPs (Fail2Ban):
fail2ban-client status | grep "Jail list:" | sed "s/ //g" | awk '{split($2,a,",");for(i in a) system("fail2ban-client status " a[i])}' | grep "Status\|IP list"
Unban IP (Fail2Ban): fail2ban-client set JAIL unbanip IP
Update, upgrade, clean:
apt-get update -y && apt-get upgrade -y && apt-get --purge autoremove -y && apt-get clean
Basic tools install: apt-get install -y wget nano htop bzip2 zip unzip screen
Extra tools install: apt-get install -y atop nload smartmontools java
List jails (Fail2Ban): fail2ban-client status
List banned IPs in single jail (Fail2Ban): fail2ban-client status JAIL
List all banned IPs (Fail2Ban):
fail2ban-client status | grep "Jail list:" | sed "s/ //g" | awk '{split($2,a,",");for(i in a) system("fail2ban-client status " a[i])}' | grep "Status\|IP list"