Skip to content

VirtuallyThatGuy

Anything VMware , PowerCLI, PowerShell, Automation and some Windows

Menu
  • Home
  • PowerCLI
  • VMware
  • Automation
  • Windows
  • About
Menu

Linux & Terraform & AIX Server Administrator Cheat Sheet

Posted on 23 October 20224 March 2024 by VirtuallyThatGuy

Most of these commands will also work on Linux , networking or terraform as specified below

CommandWhat is does?
route add -net 10.98.208.40 netmask 255.255.255.255 gw 172.31.191.254Add a static root – substitute for your IP information
route del -net 10.98.208.40 netmask 255.255.255.255 gw 172.31.191.254Remove static route
ifconfig eth1 192.168.1.2 netmask 255.255.240.0 gw 192.168.1.1Configure Ethernet
/etc/sysconfig/network-scriptsLocation for Networking boot configuration
ifup eth1 boot
enable NIC at boot
ifdown eth1 bootdisabled NIC at boot
ip -s linkenable overview of traffic
dhclient eth01
dhclient ens33
get new IP from DHCP
/etc/sysconfig/networkbasic Network config
cat /etc/resolv.confDNS server details
cat /etc/hostsLocal host file
cat /etc/servicesPorts used for Firewall
iptable -FFlush IPtables
iptables -I INPUT -p tcp –dport 48000 -j ACCEPTOpen port 48000 on firewall
CommandWhat it does
find / -xdev | xargs ls -ld | sort -rnk 5 | moreSearch AIX Filesystem for files
egrep –p “ Search string “ –f filename.loguseful for grep very large dsmsched.logs
q vol devclass=lto_tapeQueries Tape Library and Lists Scratch tapes
q reqlists requests to reply to
lscfg –vl fcs3Get details of a fibre card fcs3
nohup /opt/Tivoli/tsm/client/ba/bin/rc.tsmclient >/dev/null 2>&1Starts TSM Process
dd if=/dev/cdrom of=line500v7.1WindowsServer.iso bs=1024Command 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 | moreFinding large files in AIX (EG /VAR)
startsrc -s qdaemonrestart error daemon

Terraform Cheatsheet

CommandWhat it does?
terraform -install-autocompleteEnables tab completion
-helpShows the help files
applyapply the changes
consolecreates and interactive console
destroydestroys the Terraform-managed infrastructure
fmtused to rewrite Terraform configuration files
force-unlockused to remove lock on the state for the current configuration
getused to download and update modules
graphused to generate a a graph
importused to import existing resources
Type or VariableWhat it does
“var” prefixUser 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

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

When autocomplete results are available use up and down arrows to review and enter to go to the desired page. Touch device users, explore by touch or with swipe gestures.

Recent Posts

  • vROps: Management Pack Troubleshooting
  • Windows AD {Active Directory} (PowerShell) samples
  • Migrate VMs Between vCentres Using Powershell or PowerCLI
  • Set VM Tools to Update Automatically on VM Reboot using powershell
  • Windows Administrator Must Have Powershell Commands

Recent Comments

  • JB on Script: How to get VM with Tag Assignment and export results to csv using PowerCLI or Powershell
  • DL on How to change VCSA root password and bypass BAD PASSWORD: it is based on a dictionary word for vCenter VCSA root account warning
  • 360coolp on How to change VCSA root password and bypass BAD PASSWORD: it is based on a dictionary word for vCenter VCSA root account warning
  • Yogesh on ESXi 8.x, 7.x, 6.x Service sfcbd-watchdog Not Running / Fails to Start – VirtuallyThatGuy
  • VirtuallyThatGuy on ESXi 8.x, 7.x, 6.x Service sfcbd-watchdog Not Running / Fails to Start – VirtuallyThatGuy

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017

Categories

  • Automation
  • PowerCLI
  • VMware
  • Windows
© 2025 VirtuallyThatGuy | Powered by Superbs Personal Blog theme