Most of these commands will also work on Linux , networking or terraform as specified below
| Command | What is does? |
|---|---|
| route add -net 10.98.208.40 netmask 255.255.255.255 gw 172.31.191.254 | Add a static root – substitute for your IP information |
| route del -net 10.98.208.40 netmask 255.255.255.255 gw 172.31.191.254 | Remove static route |
| ifconfig eth1 192.168.1.2 netmask 255.255.240.0 gw 192.168.1.1 | Configure Ethernet |
| /etc/sysconfig/network-scripts | Location for Networking boot configuration |
| ifup eth1 boot | enable NIC at boot |
| ifdown eth1 boot | disabled NIC at boot |
| ip -s link | enable overview of traffic |
| dhclient eth01 dhclient ens33 | get new IP from DHCP |
| /etc/sysconfig/network | basic Network config |
| cat /etc/resolv.conf | DNS server details |
| cat /etc/hosts | Local host file |
| cat /etc/services | Ports used for Firewall |
| iptable -F | Flush IPtables |
| iptables -I INPUT -p tcp –dport 48000 -j ACCEPT | Open port 48000 on firewall |
| Command | What it does |
| find / -xdev | xargs ls -ld | sort -rnk 5 | more | Search AIX Filesystem for files |
| egrep –p “ Search string “ –f filename.log | useful for grep very large dsmsched.logs |
| q vol devclass=lto_tape | Queries Tape Library and Lists Scratch tapes |
| q req | lists requests to reply to |
| lscfg –vl fcs3 | Get details of a fibre card fcs3 |
| nohup /opt/Tivoli/tsm/client/ba/bin/rc.tsmclient >/dev/null 2>&1 | Starts TSM Process |
| dd if=/dev/cdrom of=line500v7.1WindowsServer.iso bs=1024 | Command how to copy ISO on AIX |
| ls |sort |awk ‘{name=toupper($1);if(name==pre1) printf(“** %s %s\n”,$1,pre2); pre1=name;pre2=$1}’ | AIX command used to find the duplicate files |
| find /var -xdev | xargs ls -ld | sort -rnk 5 | more | Finding large files in AIX (EG /VAR) |
| startsrc -s qdaemon | restart error daemon |
Terraform Cheatsheet
| Command | What it does? |
|---|---|
| terraform -install-autocomplete | Enables tab completion |
| -help | Shows the help files |
| apply | apply the changes |
| console | creates and interactive console |
| destroy | destroys the Terraform-managed infrastructure |
| fmt | used to rewrite Terraform configuration files |
| force-unlock | used to remove lock on the state for the current configuration |
| get | used to download and update modules |
| graph | used to generate a a graph |
| import | used to import existing resources |
| Type or Variable | What it does |
|---|---|
| “var” prefix | User String Variable Interpolate |
| “var.MAP[“KEY”] | User Map Variable Value of Key |
| “${var.LIST}” | Value of the list as a list List elements by Index |
| “self.ATTRIBUTE” | Own Resource |
| “TYPE.NAME.ATTRIBUTE” | Other Resource |
| “data.TYPE.NAME.ATTRIBUTE” | Data Source |
| MODULE.NAME.OUTPUT” | Module outputs |
| “Count.FIELD” | Count |
| “path.TYPE” | Path |
| “terraform.FIELD” | Terraform Meta |