Command Utilities

Windows command utilities are run from the Start menu Run .. or Search .. dialogs. These utilities may require administrative privileges, that is, right-click and select run as ... to execute.

MSCONFIG.EXE

Possibly the tools tab in this utility is useful.

TASKMGR.EXE

Has a shutdown tab which permits remote users to control machines no matter what.

CMD.EXE and COMMAND.EXE

Display the command line window as follows: In Windows XP, select Start ‣ Run... from the taskbar menu, then type cmd <Enter>. In Windows 7, display the Start menu, and type cmd in the Search box, then press <Enter>. To run cmd.exe as administrator, <right-click> the program name and select Run as Administrator from the menu.

Following are selected commands which may be helpful in reviewing settings and diagnosing installation problems. [1]

Networking

ipconfig reports or changes IP settings for a workstation:

ipconfig /allreport the current IP configuration
ipconfig /releaseclear the current IP configuration
ipconfig /renewobtain new IP settings through DHCP
ipconfig /flushdnsclear cached dns entries

ping queries an IP address or DNS name and reports the result:

ping 127.0.0.1queries the network interface in the workstation itself
ping 192.168.2.241queries the LAN interface eth1 in the AAltSys server
ping 192.168.1.1 or ping 192.168.1.254queries probable addresses for the WAN gateway
ping google.comperforms a DNS lookup on and queries a remote IP

nslookup queries a DNS name and returns its corresponding IP address:

nslookup google.comqueries DNS services, not actual IP addresses

netsh queries and diagnoses networking issues on a workstation:

netsh diag guidisplays networking diagnostics in a gui window

Note

Microsoft Professionals use additional networking diagnostic tools which are not included with the OS. Search for downloads of dcdiag or dnslint. (Microsoft’s attitude about excluding diagnostics from OS releases is encapsulated in this quote: “DNSLint is a Microsoft Windows utility that helps you to diagnose common DNS name resolution issues.”)

File system management

sfc /scannowscan and repair protected system files

Warning

For experts only – These utilities change ACLs for file and folder ownership.

cacls *.* /E /R (username):Fadds full permissions to files
cacls *.* /T /E /P (username):Fadds full permissions to all files and special files
cacls __filename__ /G (username):F – grants full rights to file*
takeown /f __filename__ – change ownership (Unix chown)
takeown /f __directory__ /r – change ownership of directory tree

System controls

mmcan alternative way to open system control panels

Mac OS X Console Commands

The Mac OS-X command line window is displayed by opening Applications ‣ Utilities ‣ Terminal.app. The following commands are helpful in reviewing settings and diagnosing installation problems.

Tip

Mac OS-X commands work on Linux and Unix systems as well.

ifconfig

This command reports or changes the IP settings for a Mac OS X workstation:

ifconfigreport the current IP configuration
ifconfig en0report the current IP configuration for the ethernet adapter
ifconfig en1report the current IP configuration for the airport adaptor in some models

ping

This command executes a network query to an IP address and reports the result:

ping 127.0.0.1queries the workstation network interface itself
ping 192.168.2.241queries LAN interface eth1 in the AAltSys server
ping 192.168.1.1 or ping 192.168.1.254queries likely WAN gateways
ping google.comperforms a DNS lookup on the Internet and queries a remote server

chown / chmod

Warning

For experts only – These utilities change file and folder ownership and permissions.

chown -R (username) *makes (username) the owner of all files, folders, subdirectories, and sub files
chmod -R 777 ./*makes all files have read, write, and execute permissions set for all users

Footnotes

[1]Windows commands