Unix Commands For Mac

Posted on  by 



-->

(Using the command'dmesg'will also display the MAC address - along with a lot of other information) Example 'ifconfig -a' output. HP-UX (HP UNIX) As the root user (or user with appropriate permissions) Type '/usr/sbin/lanscan' From the displayed information, find lan0 (this is. Command-line shells and terminals. Windows supports several command-line shells and terminals which sometimes work a little differently to the Mac's BASH shell and terminal emulator apps like Terminal and iTerm. Windows has two primary command-line shells. Once you have a window open and you’re typing commands, it’s helpful to know that regular Mac OS X copy and paste commands work, so it’s simple to send an email message to a colleague showing your latest Unix interaction, or to paste some text from a web page into a file you’re editing with a Unix text editor such as vi.

The following tips and control equivalents should help you in your transition between a Mac and Windows (or WSL/Linux) development environment.

For app development, the nearest equivalent to Xcode would be Visual Studio. There is also a version of Visual Studio for Mac, if you ever feel the need to go back. For cross-platform source code editing (and a huge number of plug-ins) Visual Studio Code is the most popular choice.

Keyboard shortcuts

OperationMacWindows
CopyCommand+CCtrl+C
CutCommand+XCtrl+X
PasteCommand+VCtrl+V
UndoCommand+ZCtrl+Z
SaveCommand+SCtrl+S
OpenCommand+OCtrl+O
Lock computerCommand+Control+QWindowsKey+L
Show desktopCommand+F3WindowsKey+D
Open file browserCommand+NWindowsKey+E
Minimize windowsCommand+MWindowsKey+M
SearchCommand+SpaceWindowsKey
Close active windowCommand+WControl+W
Switch current taskCommand+TabAlt+Tab
Maximize a window to full screenControl+Command+FWindowsKey+Up
Save screen (Screenshot)Command+Shift+3WindowsKey+Shift+S
Save windowCommand+Shift+4WindowsKey+Shift+S
View item information or propertiesCommand+IAlt+Enter
Select all itemsCommand+ACtrl+A
Select more than one item in a list (noncontiguous)Command, then click each itemControl, then click each item
Type special charactersOption+ character keyAlt+ character key

Trackpad shortcuts

Note: Some of these shortcuts require a “Precision Trackpad”, such as the trackpad on Surface devices and some other third party laptops.

OperationMacWindows
ScrollTwo finger vertical swipeTwo finger vertical swipe
ZoomTwo finger pinch in and outTwo finger pinch in and out
Swipe back and forward between viewsTwo finger sideways swipeTwo finger sideways swipe
Switch virtual workspacesFour fingers sideways swipeFour fingers sideways swipe
Display currently open appsFour fingers upward swipeThree fingers upward swipe
Switch between appsN/ASlow three finger sideways swipe
Go to desktopSpread out four fingersThree finger swipe downwards
Open Cortana / Action centerTwo finger slide from rightThree finger tap
Open extra informationThree finger tapN/A
Show launchpad / start an appPinch with four fingersTap with four fingers

Note: Trackpad options are configurable on both platforms.

Command-line shells and terminals

Windows supports several command-line shells and terminals which sometimes work a little differently to the Mac's BASH shell and terminal emulator apps like Terminal and iTerm.

Mac commands for terminal

Windows shells

Windows has two primary command-line shells:

  1. PowerShell - PowerShell is a cross-platform task automation and configuration management framework, consisting of a command-line shell and scripting language built on .NET. Using PowerShell, administrators, developers, and power-users can rapidly control and automate tasks that manage complex processes and various aspects of the environment and operating system upon which it is run. PowerShell is fully open-source, and because it is cross-platform, also available for Mac and Linux.

    Mac and Linux BASH shell users: PowerShell also supports many command-aliases that you are already familiar with. For example:

    • List the contents of the current directory, using: ls
    • Move files with: mv
    • Move to a new directory with: cd <path>

    Some commands and arguments are different in PowerShell vs. BASH. Learn more by entering: get-help in PowerShell or checkout the compatibility aliases in the docs.

    To run PowerShell as an Administrator, enter 'PowerShell' in your Windows start menu, then select 'Run as Administrator.'

  2. Windows Command Line (Cmd): Windows still ships the traditional Command Prompt (and Console – see below), providing compatibility with current and legacy MS-DOS-compatible commands and batch files. Cmd is useful when running existing/older batch files or command-line operations, but in general, users are recommended to learn and use PowerShell since Cmd is now in maintenance, and will not be receiving any improvements or new features in the future.

Linux shells

Windows Subsystem for Linux (WSL) can now be installed to support running a Linux shell within Windows. This means that you can run bash, with whichever specific Linux distribution you choose, integrated right inside Windows. Using WSL will provide the kind of environment most familiar to Mac users. For example, you will ls to list the files in a current directory, not dir as you would with the traditional Windows Cmd Shell. To learn about installing and using WSL, see the Windows Subsystem for Linux Installation Guide for Windows 10. Linux distributions that can be installed on Windows with WSL include:

Just to name a few. Find more in the WSL install docs and install them directly from the Microsoft Store.

Windows Terminals

In addition to many 3rd party offerings, Microsoft provides two “terminals” – GUI applications that provide access to command-line shells and applications.

  1. Windows Terminal: Windows Terminal is a new, modern, highly configurable command-line terminal application that provides very high performance, low-latency command-line user experience, multiple tabs, split window panes, custom themes and styles, multiple “profiles” for different shells or command-line apps, and considerable opportunities for you to configure and personalize many aspects of your command-line user experience.

    You can use Windows Terminal to open tabs connected to PowerShell, WSL shells (like Ubuntu or Debian), the traditional Windows Command Prompt, or any other command-line app (e.g. SSH, Azure CLI, Git Bash).

  2. Console: On Mac and Linux, users usually start their preferred terminal application which then creates and connects to the user’s default shell (e.g. BASH).

    However, due to a quirk of history, Windows users traditionally start their shell, and Windows automatically starts and connects a GUI Console app.

    While one can still launch shells directly and use the legacy Windows Console, it’s highly recommended that users instead install and use Windows Terminal to experience the best, fastest, most productive command-line experience.

Apps and utilities

AppMacWindows
Settings and PreferencesSystem PreferencesSettings
Task managerActivity MonitorTask Manager
Disk formattingDisk UtilityDisk Management
Text editingTextEditNotepad
Event viewingConsoleEvent Viewer
Find files/appsCommand+SpaceWindows key

Home > Articles > Apple > Operating Systems

  1. Installing Packages
Page 1 of 6Next >
Deploying small but critical updates and making minor changes to every computer across a network can be a daunting task. In the fourth installment of his series on Apple Remote Desktop, Ryan Faas shows you how to harness Remote Desktop to make installing anything from new fonts, to rolling out a complete list of Mac OS X and application updates, to making simple or complex configuration changes across every Mac in your network almost effortless.
Like this article? We recommend
Apple Training Series: Mac OS X v10.4 System Administration Reference, Volume 2

Like this article? We recommend

Like this article? We recommend

Apple Training Series: Mac OS X v10.4 System Administration Reference, Volume 2

By Ryan Faas

So far in this series detailing the features and uses of Apple Remote Desktop 3, we have talked about how to plan a Remote Desktop installation within a network; how to interact with users; how to observe and control remote computers; how to perform basic tasks (shutting down computers, emptying the Trash, and logging out users) without needing to actually take control of a computer; how to search the local volumes of remote computers for files; and how to use Remote Desktop’s rich reporting capabilities. This article looks at another incredible facet of Apple Remote Desktop: its function as a powerful deployment tool for applications, updates, files, and system settings.

If you’ve read my previous articles about deploying new computers in a network, you’ll know that I’m a big fan of using disk image–based deployment techniques such as Apple Software Restore and NetInstall. These are very efficient ways to deploy a number of new computers or a number of major updates to existing computers. These tools are also effective for providing a wide variety of unique system configurations for individual departments because you can easily store a handful of images either on a server or external hard drive for use when needed.

However, the problem with disk image deployments is that they are really good only for complete system deployments. When you only want to apply a handful of software updates throughout your network or install a single new application for one department, replacing the entire hard drive contents on each computer would be like fixing a leaky sink by replacing the entire kitchen. Remote Desktop provides excellent options for these smaller rollouts and can be a dream tool for systems administrators everywhere with its variety of deployment tools, some of which can even be helpful for teachers or managers needing to provide files to students or staff members.

Installing Packages

Most Mac OS X applications and software updates (be they updates released by Apple or third parties) use package or metapackage files for installation. These files, which have the .pkg or .mpkg file extensions, are processed by the Mac OS X Installer utility. The use of a standard package format has many advantages for Mac OS X. One of them is to provide a record of all packages installed on a computer by copying the individual packages to the /Library/Receipts folder of its startup drive. Another is that when you download updates using Apple’s Software Update, you can Control-click (or right-click if you’re using a two-button mouse) each update and choose the option to save the package for later use on other computers after it is installed.

For users of Apple Remote Desktop, there is another advantage—Apple Remote Desktop can deploy packages to remote computers very easily. By selecting computers in a computer list and selecting Install Packages from the Manage menu, you can specify any number of packages to be copied to be installed on those computers. This makes deploying updates of all sorts a quick and easy process. Likewise, you can install any application that uses the package format using the same technique. This is much easier than trying to ensure that users are downloading updates when Software Update alerts them, and it enables you to easily distribute updates of third-party applications.

In Apple Remote Desktop 3, the Install Packages command has actually sprouted some new and very useful features. The most impressive of them comes from the use of task servers in a network. If you elect to run the install task using a task server, you can configure the install to include computers that are not currently available (such as a portable Macs that might be off the network or computers that are shut down). You also now have the option of encrypting the packages as they are copied to the task server and target computers. Finally, you have the ability to control how much network bandwidth is used for the deployment of the selected packages (which can prevent the deployment from creating an overall network slowdown).

Using the Install Packages command is very simple. First, select the target computers in a computer list (or other Remote Desktop list, such as a report) and then select Install Packages from the Manage menu. The Install Packages dialog box (shown in Figure 1) includes a listbox for the packages to install as well as a series of options for how the install should proceed. At the bottom of the dialog box is the standard listbox identifying the target computers (you can drag additional computers to this listbox) and buttons to perform the install and to save or schedule the task for later use.

You can add the packages that you want to deploy by dragging them into the Packages listbox or by clicking the plus sign button to locate them using a File Open dialog box. You can also drag them within the listbox to determine the order in which they will be installed (this might be relevant if you were installing an application using the package from its install CD and then installing an update to it that you downloaded from the manufacturer’s website). You can remove packages from the list by selecting them and then clicking the minus sign button.

The first option that you have for package deployment is how Remote Desktop will react to packages that require a restart after installation. You can specify that the computer not be restarted, that the computer will restart but offer users the option of saving any work before restarting, or to force an immediate restart. The choice you make really depends on whether you expect the computer to be used particularly heavily at the time of deployment and whether it is likely to be restarted in the near future if you don’t require a restart. If you intend to force an immediate restart on a computer in use, you should probably send a message to the user of that computer prior to starting the deployment so that they can finish any work in progress. Also, be aware that if you are installing multiple packages, Remote Desktop will not restart the computer until all packages have been installed.

The next option is whether to run the task from the computer you are working on or from a designated task server. The Run This Task From option includes 'this application' (the computer you are using) or the task server that is designated in the Remote Desktop preferences (see Part 1 of this series for more information on designating task servers). If you choose this application, the deployment will run only while you have Remote Desktop open and will not be queued for workstations currently offline. If you choose a remote task server, the command will be issued to that task server, and the packages will be copied to it before being copied to any available target computers. The task will then remain queued on the task server until the remaining computers become available and the packages are installed on them.

The next option lets you determine how Remote Desktop handles a problem when installing the packages. The checkbox lets you designate whether the installation should be stopped on all computers if there is a problem or whether it should proceed on those computers where no problem is encountered.

This is followed by the option to encrypt the packages as they are copied over the network. This option is available independent of the Encrypt All Network Traffic option in the Remote Desktop preferences. However, like that option it will require that target computers have Remote Login enabled.

The final option is to limit the amount of bandwidth used when copying packages. If you are deploying packages of a large size (either individually or combined), you may experience a decrease in network performance as these files are copied to all the target computers. This is particularly true if you are deploying to a large number of computers, if all the computers are on one network segment, or if there are slow network links between the task server and the target computers. Remember, the task server will be performing a unicast copy—meaning that it is sending each package to each computer separately. You can select to limit the network usage and specify the maximum bandwidth in KBps that can be used.

Related Resources

  • Book $55.99
  • eBook (Watermarked) $55.99

Unix Commands For Mac

  • Web Edition $55.99




Coments are closed