Windows Cheatsheet for Linux Engineers

Most dev-op engineers are either Windows or Linux expert but not both. This article provides you with resources on commonly used command and documentations.

Please note that this article shows close command equivalent only; the commands do not necessarily give you the exact same kind of data.

Frequently Used Commands

Shell on Linux Powershell on Windows
cat cat
cd cd
date date or Get-Date
df -hi Get-PSDrive
env Get-ChildItem Env:
... | grep ... | findstr
history history
ifconfig ipconfig
ls ls or Get-Children
nslookup nslookup or Resolve-DnsName
netstat netstat
ping ping
ps ps or Get-Process
ssh Enter-PSSession
systemctl start docker Start-Service docker
systemctl stop docker Stop-Service docker
... | tail -n 5 ... | Select-Object -Last 5
top While(1) {ps | sort -des cpu | select -f 15 | ft -a; sleep 2; cls}
tree tree
vivimgedit notepad

Important Directories (defaults)

Linux Windows
client binary /usr/bin/docker C:\Program Files\Docker\docker.exe
daemon binary /usr/bin/dockerd C:\Program Files\Docker\dockerd.exe
daemon config /etc/docker C:\ProgramData\docker\config
data root dir /var/lib/docker C:\ProgramData\docker
host file /etc/hosts C:\Windows\System32\drivers\etc\hosts
Advertisements

ssh to the minions in pks cluster

a. Open the Ops Manager interface by navigating to the Ops Manager fully qualified domain name (FQDN) in a web browser.

b. Click the Ops Manager Director tile and select the Status tab.

c. Record the IP address for the Director job. This is the IP address of the VM where the BOSH Director runs.
d. Select the Credentials tab.

e. Click Link to Credential to view the Director Credentials. Record these credentials.

f. ssh to the ops manager vm
a. bosh alias-env gcp -e 192.168.101.10 –ca-cert /var/tempest/workspaces/default/root_ca_certificate
where 192.168.101.10 is the DIRECTOR-IP-ADDRESS we retrieved in step 1.
b. bosh -e gcp log-in
enter the identity and password retrieved in step 1
c. bosh -e gcp vms
will list the vms
d. bosh -e gcp -d service-instance_00579a16-7d5e-4ab5-9dfb-e70873d24ed2 ssh worker/55764b66-7eb9-4834-a9f4-24fd421558cc
where service-instance_00579a16-7d5e-4ab5-9dfb-e70873d24ed2 is deployment name and is instance name