In addition to keyboard shortcuts, there are also lesser-known commands that can help navigate your computers more efficiently. By utilizing these commands, we can quickly perform tasks and access features we may not have known were available.

In this post, we’ll have a quick look at some lesser-known commands for both Windows and Mac.

Windows

Command Prompt

  • tree: Displays the directory structure of the current directory and any subdirectories.
  • ipconfig /all: Displays detailed network configuration information including IP address, subnet mask, DNS servers, and more.
  • systeminfo: Provides detailed configuration information for a computer, including BIOS version, processor information, and installed hotfixes.
  • tasklist: Lists all running processes on the computer.
  • netstat -ano: Displays active network connections and associated processes.

Control Panel

  • control printers: Opens the Printers window
  • control userpasswords2: Opens the User Accounts window
  • control admintools: Opens the Administrative Tools window
  • control /name Microsoft.DeviceManager: Opens the Device Manager window

Windows PowerShell

  • Get-ChildItem: Lists all files and folders in the current directory and any subdirectories.
  • Get-Process | Sort-Object CPU -Descending: Lists all running processes and sorts them by CPU usage.
  • Get-Service: Lists all installed services and their statuses.
  • New-Item -ItemType file -Path “C:\temp\newfile.txt”: Creates a new file in the specified directory.
  • Get-History: Displays the command history of the PowerShell session.


Mac

Terminal

  • open .: Opens the current directory in Finder.
  • networksetup -listallhardwareports: Displays a list of all network interfaces and their associated hardware ports.
  • pmset -g: Displays the current power management settings.
  • caffeinate: Prevents the computer from sleeping until the command is stopped with Control-C.
  • say “hello”: Makes the computer say “hello” aloud.

Activity Monitor

  • sudo opensnoop -v: Displays all files being opened in real-time.
  • sudo fs_usage: Displays real-time file system activity.
  • sudo lsof: Lists all open files and the processes that opened them.
  • sudo dtrace -l: Lists all available DTrace probes.
  • sudo top -u: Displays system usage statistics sorted by user.

Finder

  • defaults write com.apple.Finder AppleShowAllFiles true: Shows hidden files in the Finder.
  • defaults write com.apple.Finder AppleShowAllFiles false: Hides hidden files in the Finder.
  • defaults write com.apple.finder QuitMenuItem -bool YES: Adds “Quit Finder” to the Finder menu.
  • defaults write com.apple.finder AppleShowAllExtensions -bool true: Shows file extensions in the Finder.
  • defaults write com.apple.finder AppleShowAllExtensions -bool false: Hides file extensions in the Finder.

Leave a comment