Submitted by bobbitt on Tue, 08/27/2013 - 13:47
Windows and command line go together like ice-cream and pickles, but there are actually some neat commands you can lean on to get things done. Here are some that I've discovered.
- tasklist /svc: List all services
- netstat -o -b: Show all processes/files with open net connections
- netsh: Allows all kids of cool stuff. I especially like netsh firewall which can be used to examine or even configure the Windows Firewall settings.
- getmac: Show device MAC addresses
- pathping ''[host]'': Ping/traceroute combo
- openfiles: Show/disconnect open file shares
- fsutil: Show/modify disk settings (dirty flag, etc)
- comp: diff
- recover: Disk/file recovery
- shutdown: no surirpises
- wmic: Windows Management Instrumentation Command line (read lots of system settings not available elsewhere)
- iexpress: Create a self extracting archive (turn .bat or .vbs into .exe)
Registry Hacks
- Set HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters\MaxNegativeCacheTtl to 0 to disable negative DNS caching.
Included below are some commands that I have found, created or tweaked to help make life easier along the way.
Getting SELinux working can be tough. Here are some commands I found useful.
Is SELinux enabled?
Deactivate all inactive users in the last year:
Yes, some distros still use rpm.
Extract files from an RPM:
Get into the correct directory:
cd /etc/pki/tls/certs