To use a keyboard shortcut, press and hold one or more modifier keys and then press the last key of the shortcut. For example, to use Command-C (copy), press and hold the Command key, then the C key, then release both keys. Mac menus and keyboards often use symbols for certain keys, including modifier keys:

The top command on OS X is pretty crappy. The one included with most Linux distros allows you to change the sort-by column using, there is a coloured mode (by pressing the z key), and a bunch of other useful options. Is there a replacement command line tool? Ideally I would like htop for OS X, but because it relies on the /proc/ filesystem (see this thread) it has not been ported.

Press the keyboard shortcut Command (⌘) + T. Or launch Spotlight by clicking the magnifying glass icon in the upper horizontal menu on the right. Or use the keyboard shortcut Ctrl + Space. In the Spotlight search bar, enter the word “Terminal” and press “Enter”. Take command of the Combined Forces in their battle to beat back a resurgent Black Penguin Oil in Forts’ first DLC. Moonshot DLC features a whole new campaign, new weapons, features and commanders! NEW CAMPAIGN Fight to recover the moontech across the Pacific Rim, in four new theatres of combat, unlocking new weapons, and discovering new.


On keyboards made for Windows PCs, use the Alt key instead of Option, and the Windows logo key instead of Command.

Some keys on some Apple keyboards have special symbols and functions, such as for display brightness , keyboard brightness , Mission Control, and more. If these functions aren't available on your keyboard, you might be able to reproduce some of them by creating your own keyboard shortcuts. To use these keys as F1, F2, F3, or other standard function keys, combine them with the Fn key.

Cut, copy, paste, and other common shortcuts

  • Command-X: Cut the selected item and copy it to the Clipboard.
  • Command-C: Copy the selected item to the Clipboard. This also works for files in the Finder.
  • Command-V: Paste the contents of the Clipboard into the current document or app. This also works for files in the Finder.
  • Command-Z: Undo the previous command. You can then press Shift-Command-Z to Redo, reversing the undo command. In some apps, you can undo and redo multiple commands.
  • Command-A: Select All items.
  • Command-F: Find items in a document or open a Find window.
  • Command-G: Find Again: Find the next occurrence of the item previously found. To find the previous occurrence, press Shift-Command-G.
  • Command-H: Hide the windows of the front app. To view the front app but hide all other apps, press Option-Command-H.
  • Command-M: Minimize the front window to the Dock. To minimize all windows of the front app, press Option-Command-M.
  • Command-O: Open the selected item, or open a dialog to select a file to open.
  • Command-P: Print the current document.
  • Command-S: Save the current document.
  • Command-T: Open a new tab.
  • Command-W: Close the front window. To close all windows of the app, press Option-Command-W.
  • Option-Command-Esc: Force quit an app.
  • Command–Space bar: Show or hide the Spotlight search field. To perform a Spotlight search from a Finder window, press Command–Option–Space bar. (If you use multiple input sources to type in different languages, these shortcuts change input sources instead of showing Spotlight. Learn how to change a conflicting keyboard shortcut.)
  • Control–Command–Space bar: Show the Character Viewer, from which you can choose emoji and other symbols.
  • Control-Command-F: Use the app in full screen, if supported by the app.
  • Space bar: Use Quick Look to preview the selected item.
  • Command-Tab: Switch to the next most recently used app among your open apps.
  • Shift-Command-5: In macOS Mojave or later, take a screenshot or make a screen recording. Or use Shift-Command-3 or Shift-Command-4 for screenshots. Learn more about screenshots.
  • Shift-Command-N: Create a new folder in the Finder.
  • Command-Comma (,): Open preferences for the front app.

Sleep, log out, and shut down shortcuts

You might need to press and hold some of these shortcuts for slightly longer than other shortcuts. This helps you to avoid using them unintentionally.

  • Power button: Press to turn on your Mac or wake it from sleep. Press and hold for 1.5 seconds to put your Mac to sleep.* Continue holding to force your Mac to turn off.
  • Option–Command–Power button* or Option–Command–Media Eject : Put your Mac to sleep.
  • Control–Shift–Power button* or Control–Shift–Media Eject : Put your displays to sleep.
  • Control–Power button* or Control–Media Eject : Display a dialog asking whether you want to restart, sleep, or shut down.
  • Control–Command–Power button:* Force your Mac to restart, without prompting to save any open and unsaved documents.
  • Control–Command–Media Eject : Quit all apps, then restart your Mac. If any open documents have unsaved changes, you will be asked whether you want to save them.
  • Control–Option–Command–Power button* or Control–Option–Command–Media Eject : Quit all apps, then shut down your Mac. If any open documents have unsaved changes, you will be asked whether you want to save them.
  • Control-Command-Q: Immediately lock your screen.
  • Shift-Command-Q: Log out of your macOS user account. You will be asked to confirm. To log out immediately without confirming, press Option-Shift-Command-Q.

* Does not apply to the Touch ID sensor.

Finder and system shortcuts

  • Command-D: Duplicate the selected files.
  • Command-E: Eject the selected disk or volume.
  • Command-F: Start a Spotlight search in the Finder window.
  • Command-I: Show the Get Info window for a selected file.
  • Command-R: (1) When an alias is selected in the Finder: show the original file for the selected alias. (2) In some apps, such as Calendar or Safari, refresh or reload the page. (3) In Software Update preferences, check for software updates again.
  • Shift-Command-C: Open the Computer window.
  • Shift-Command-D: Open the desktop folder.
  • Shift-Command-F: Open the Recents window, showing all of the files you viewed or changed recently.
  • Shift-Command-G: Open a Go to Folder window.
  • Shift-Command-H: Open the Home folder of the current macOS user account.
  • Shift-Command-I: Open iCloud Drive.
  • Shift-Command-K: Open the Network window.
  • Option-Command-L: Open the Downloads folder.
  • Shift-Command-N: Create a new folder.
  • Shift-Command-O: Open the Documents folder.
  • Shift-Command-P: Show or hide the Preview pane in Finder windows.
  • Shift-Command-R: Open the AirDrop window.
  • Shift-Command-T: Show or hide the tab bar in Finder windows.
  • Control-Shift-Command-T: Add selected Finder item to the Dock (OS X Mavericks or later)
  • Shift-Command-U: Open the Utilities folder.
  • Option-Command-D: Show or hide the Dock.
  • Control-Command-T: Add the selected item to the sidebar (OS X Mavericks or later).
  • Option-Command-P: Hide or show the path bar in Finder windows.
  • Option-Command-S: Hide or show the Sidebar in Finder windows.
  • Command–Slash (/): Hide or show the status bar in Finder windows.
  • Command-J: Show View Options.
  • Command-K: Open the Connect to Server window.
  • Control-Command-A: Make an alias of the selected item.
  • Command-N: Open a new Finder window.
  • Option-Command-N: Create a new Smart Folder.
  • Command-T: Show or hide the tab bar when a single tab is open in the current Finder window.
  • Option-Command-T: Show or hide the toolbar when a single tab is open in the current Finder window.
  • Option-Command-V: Move the files in the Clipboard from their original location to the current location.
  • Command-Y: Use Quick Look to preview the selected files.
  • Option-Command-Y: View a Quick Look slideshow of the selected files.
  • Command-1: View the items in the Finder window as icons.
  • Command-2: View the items in a Finder window as a list.
  • Command-3: View the items in a Finder window in columns.
  • Command-4: View the items in a Finder window in a gallery.
  • Command–Left Bracket ([): Go to the previous folder.
  • Command–Right Bracket (]): Go to the next folder.
  • Command–Up Arrow: Open the folder that contains the current folder.
  • Command–Control–Up Arrow: Open the folder that contains the current folder in a new window.
  • Command–Down Arrow: Open the selected item.
  • Right Arrow: Open the selected folder. This works only when in list view.
  • Left Arrow: Close the selected folder. This works only when in list view.
  • Command-Delete: Move the selected item to the Trash.
  • Shift-Command-Delete: Empty the Trash.
  • Option-Shift-Command-Delete: Empty the Trash without confirmation dialog.
  • Command–Brightness Down: Turn video mirroring on or off when your Mac is connected to more than one display.
  • Option–Brightness Up: Open Displays preferences. This works with either Brightness key.
  • Control–Brightness Up or Control–Brightness Down: Change the brightness of your external display, if supported by your display.
  • Option–Shift–Brightness Up or Option–Shift–Brightness Down: Adjust the display brightness in smaller steps. Add the Control key to this shortcut to make the adjustment on your external display, if supported by your display.
  • Option–Mission Control: Open Mission Control preferences.
  • Command–Mission Control: Show the desktop.
  • Control–Down Arrow: Show all windows of the front app.
  • Option–Volume Up: Open Sound preferences. This works with any of the volume keys.
  • Option–Shift–Volume Up or Option–Shift–Volume Down: Adjust the sound volume in smaller steps.
  • Option–Keyboard Brightness Up: Open Keyboard preferences. This works with either Keyboard Brightness key.
  • Option–Shift–Keyboard Brightness Up or Option–Shift–Keyboard Brightness Down: Adjust the keyboard brightness in smaller steps.
  • Option key while double-clicking: Open the item in a separate window, then close the original window.
  • Command key while double-clicking: Open a folder in a separate tab or window.
  • Command key while dragging to another volume: Move the dragged item to the other volume, instead of copying it.
  • Option key while dragging: Copy the dragged item. The pointer changes while you drag the item.
  • Option-Command while dragging: Make an alias of the dragged item. The pointer changes while you drag the item.
  • Option-click a disclosure triangle: Open all folders within the selected folder. This works only when in list view.
  • Command-click a window title: See the folders that contain the current folder.
  • Learn how to use Command or Shift to select multiple items in the Finder.
  • Click the Go menu in the Finder menu bar to see shortcuts for opening many commonly used folders, such as Applications, Documents, Downloads, Utilities, and iCloud Drive.

Document shortcuts

The behavior of these shortcuts may vary with the app you're using.

  • Command-B: Boldface the selected text, or turn boldfacing on or off.
  • Command-I: Italicize the selected text, or turn italics on or off.
  • Command-K: Add a web link.
  • Command-U: Underline the selected text, or turn underlining on or off.
  • Command-T: Show or hide the Fonts window.
  • Command-D: Select the Desktop folder from within an Open dialog or Save dialog.
  • Control-Command-D: Show or hide the definition of the selected word.
  • Shift-Command-Colon (:): Display the Spelling and Grammar window.
  • Command-Semicolon (;): Find misspelled words in the document.
  • Option-Delete: Delete the word to the left of the insertion point.
  • Control-H: Delete the character to the left of the insertion point. Or use Delete.
  • Control-D: Delete the character to the right of the insertion point. Or use Fn-Delete.
  • Fn-Delete: Forward delete on keyboards that don't have a Forward Delete key. Or use Control-D.
  • Control-K: Delete the text between the insertion point and the end of the line or paragraph.
  • Fn–Up Arrow: Page Up: Scroll up one page.
  • Fn–Down Arrow: Page Down: Scroll down one page.
  • Fn–Left Arrow: Home: Scroll to the beginning of a document.
  • Fn–Right Arrow: End: Scroll to the end of a document.
  • Command–Up Arrow: Move the insertion point to the beginning of the document.
  • Command–Down Arrow: Move the insertion point to the end of the document.
  • Command–Left Arrow: Move the insertion point to the beginning of the current line.
  • Command–Right Arrow: Move the insertion point to the end of the current line.
  • Option–Left Arrow: Move the insertion point to the beginning of the previous word.
  • Option–Right Arrow: Move the insertion point to the end of the next word.
  • Shift–Command–Up Arrow: Select the text between the insertion point and the beginning of the document.
  • Shift–Command–Down Arrow: Select the text between the insertion point and the end of the document.
  • Shift–Command–Left Arrow: Select the text between the insertion point and the beginning of the current line.
  • Shift–Command–Right Arrow: Select the text between the insertion point and the end of the current line.
  • Shift–Up Arrow: Extend text selection to the nearest character at the same horizontal location on the line above.
  • Shift–Down Arrow: Extend text selection to the nearest character at the same horizontal location on the line below.
  • Shift–Left Arrow: Extend text selection one character to the left.
  • Shift–Right Arrow: Extend text selection one character to the right.
  • Option–Shift–Up Arrow: Extend text selection to the beginning of the current paragraph, then to the beginning of the following paragraph if pressed again.
  • Option–Shift–Down Arrow: Extend text selection to the end of the current paragraph, then to the end of the following paragraph if pressed again.
  • Option–Shift–Left Arrow: Extend text selection to the beginning of the current word, then to the beginning of the following word if pressed again.
  • Option–Shift–Right Arrow: Extend text selection to the end of the current word, then to the end of the following word if pressed again.
  • Control-A: Move to the beginning of the line or paragraph.
  • Control-E: Move to the end of a line or paragraph.
  • Control-F: Move one character forward.
  • Control-B: Move one character backward.
  • Control-L: Center the cursor or selection in the visible area.
  • Control-P: Move up one line.
  • Control-N: Move down one line.
  • Control-O: Insert a new line after the insertion point.
  • Control-T: Swap the character behind the insertion point with the character in front of the insertion point.
  • Command–Left Curly Bracket ({): Left align.
  • Command–Right Curly Bracket (}): Right align.
  • Shift–Command–Vertical bar ( ): Center align.
  • Option-Command-F: Go to the search field.
  • Option-Command-T: Show or hide a toolbar in the app.
  • Option-Command-C: Copy Style: Copy the formatting settings of the selected item to the Clipboard.
  • Option-Command-V: Paste Style: Apply the copied style to the selected item.
  • Option-Shift-Command-V: Paste and Match Style: Apply the style of the surrounding content to the item pasted within that content.
  • Option-Command-I: Show or hide the inspector window.
  • Shift-Command-P: Page setup: Display a window for selecting document settings.
  • Shift-Command-S: Display the Save As dialog, or duplicate the current document.
  • Shift–Command–Minus sign (-): Decrease the size of the selected item.
  • Shift–Command–Plus sign (+): Increase the size of the selected item. Command–Equal sign (=) performs the same function.
  • Shift–Command–Question mark (?): Open the Help menu.

Other shortcuts

For more shortcuts, check the shortcut abbreviations shown in the menus of your apps. Every app can have its own shortcuts, and shortcuts that work in one app might not work in another.

  • Apple Music shortcuts: Choose Help > Keyboard shortcuts from the menu bar in the Music app.
  • Other shortcuts: Choose Apple menu > System Preferences, click Keyboard, then click Shortcuts.

Learn more

  • Create your own shortcuts and resolve conflicts between shortcuts
  • Change the behavior of the function keys or modifier keys
Skip to end of metadataGo to start of metadata

The Moonshot source code is available from our GIT repository and it all can be built by hand relatively easily, assuming you have all of the prerequisite packages installed. This page has instructions for building the software itself.

Contents

macOS versions

These instructions have been tested on macOS 10.13 High Sierra and later.

1.1. Requirements

To build all of the Moonshot components, you need various packages installed. To install all of these, see below.

1.1.1. Get Xcode for macOS

To get all of the requirements on your macOS platform, you will need to install Xcode and the Xcode command-line extensions:

  1. Install Xcode from the Mac App Store.

  2. Open a Terminal, then install the Xcode Command Line Tools. You will be prompted with a dialog to install the Command Line Tools after a 130MB download.

  3. If you have never launched Xcode before, do so at least once, or run the following command in your Terminal window.

1.1.2. Get Packages for macOS

The Moonshot installer is built using Packages (http://s.sudre.free.fr/Software/Packages/about.html). Install it before trying to build the installer.

1.1.3. Install the GNU tools for macOS

You will need to install several GNU tools:

  1. Install GNU m4:

  2. Install GNU Autoconf:

  3. Install GNU Automake:

  4. Install GNU Libtool:

  5. Install pkg-config

1.1.4. Install JSON from CPAN

  1. Update CPAN and install JSON:

Just like on Linux, build and installation locations matter, with one vital difference. On macOS, the /usr tree itself is locked down and inaccessible, even for the privileged (root) user. However, locations like /usr/local are open, and with newer versions of the OS, expect this to change.

For the purposes of this set of instructions, we recommend the following:

  1. For all the Moonshot dependencies, including Moonshot itself, the --prefix parameter should be set to /usr/local/moonshot.
    If you decide to change this location, you should appropriately change the locations in the commands in Sections 3 and 5 to your preference.
  2. We recommend that you build all libraries with the -rpath parameter enabled for all libraries to avoid any clashes with other libraries (such as the older version of OpenSSL that macOS ships for compatibility reasons). We have been assured by macOS developers that the clang and libtool tools for macOS support this.
  3. We do NOT recommend using the Apple-provided sources for some libraries (such as Heimdal) as they have various customisations that may negatively impact how Moonshot works, and because Apple categorically WILL NOT support any of their own source sets (we've tried through a Platinum support path and had the support ticket closed and refunded).
    If you DO try using Apple's OpenSource sources and find that things build and function fine, please let us know by commenting on this document (with instructions that we can update this document with).
  4. These instructions should generally be backward-compatible.

3.1.1. Gettext

3.1.2. PCRE

PCRE is required during the build of some later dependencies. Libffi is one of these.

3.1.3. Libffi

Libffi is a dependency of the Glib library that in turn is used by the Moonshot library for some Dbus functionality

3.1.4. OpenSSL

3.1.5. Heimdal

Heimdal requires OpenSSL. Once OpenSSL has built successfully, build Heimdal.

Moonshot: commando mac os download

We can safely use an old version (7.3.0) since runtime GSS libraries are taken from the system installation, and newer versions seem to generate invalid moonshot binaries.

3.1.6. LibConfuse

3.1.7. LibEvent

Libevent requires OpenSSL. Once OpenSSL has built successfully, build Libevent.

3.1.8. Dbus

Dbus is used by the macOS client to communicate with the Moonshot mechanism.

3.1.9. Glib

Glib is required by the Moonshot library.

3.1.10. Jansson

Jansson is used by the Moonshot libraries.

3.1.11. libxml2

libxml2 is used to parse assertions

The Moonshot source code is all stored in a GIT repository at https://github.com/janetuk.

5.1. Libradsec

Libradsec is used by the Moonshot libraries.

Moonshot: Commando Mac Os Update

5.2. The Moonshot UI

The Moonshot UI contains two components, libmoonshot, which is the interface between the Moonshot mechanism and the Identity Selector, and the Identity Selector itself. Libmoonshot and the Identity Selector can be built together:

  1. Clone the Moonshot UI project:

    Apple Developer Team ID support

    Optionally, if you have multiple Apple Developer ID certificates for different teams installed, use the optional --with-apple-developer-id=DeveloperTeamID parameter to specify the ID that is shown in brackets in the certificates. The build currently does not support Mac Developer certificates.

    To disable Apple Developer Team ID checks and signing, specify --with-apple-developer-id=no

  2. Build Libmoonshot:

    Pay attention to the output the sudo make install command provides and double-check that the library exists in /usr/local/moonshot/lib.

  3. Build the Identity Selector:

  4. The Moonshot app will be in the ui/macos-ui/build/Release directory. You can then copy it from there to the /Applications folder.

Identity Selector app signing

Currently the Identity Selector is not signed. This is to avoid limitations with macOS sandboxing. However, once we enable signing for the Identity Selector, you should see follow these additional steps:

  1. Pay attention to the output the make app-bundle command provides. You should see something similar to this to show that the build has copied the entitlements and has signed the application:

  2. If Xcode did not sign the code and you did not disable Apple Developer ID checks and signing in Step 2, sign it manually:

  3. If you disabled Apple Developer ID checks in Step 2, skip this step. Otherwise verify the signing with the following command; you should have lines like these:

5.3. The Moonshot mechanism

Configure script parameters

There are several parameters in the command above that rely on locations noted down previously:

COMPILE_ET contains the full path to the compile_et binary that will be in your Heimdal build tree. You noted this down in the last step of Section 3.1.5.


You should now have a mech_eap.so file in /usr/local/moonshot/lib/gss.

Moonshot: Commando Mac Os Catalina

To test this build of Moonshot, you will need to make some privileged changes to the system you built this on:

  1. In /etc, create a gss directory:

  2. Copy the mech file from the Moonshot mech_eap build directory to /etc/gss

  3. As the privileged user, edit the /etc/gss/mech file:
    1. Change the mech_eap.so entry on each line to the full path of the library, e.g. /usr/local/moonshot/lib/gss/mech_eap.so
    2. Save the file.
  4. Copy the Identity Selector app (Moonshot.app) you built in Step 2 of Section 5.2 above into the /Applications folder.

  5. Run the Identity Selector app from the Launch Pad, then add a new Moonshot identity to the app.
  6. Run an SSH command to a Moonshot-enabled system that the credentials you added in the previous step will be valid for:

    Jisc Assent

    If you have an identity provider on the Jisc Assent network, you can use ssh -Kv moonshot@test-sp.infr.assent.ti.ja.net to test whether your macOS Moonshot mechanism worked successfully.

  7. You should be prompted for an identity the first time you do this, and then successfully connect to the service. You should see several lines like this in the output:

    Jisc Assent

    On the Jisc Assent Test SSH Service, the final output for success will be this:

To distribute this binary set, you will need to trim down the binaries you have built to include only the dynamic libraries and only bare essentials needed to run the mechanism:

Moonshot: Commando Mac Os Download

7.1. Automatic build

The macos-ui directory in the moonshot-ui/ tree has a Makefile that will automatically run all the build steps in Section 7.2.

  1. Change to the macos-ui directory, run make installer.
  2. The final result should be a signed (if you chose to use Apple Developer ID support) Moonshot.dmg file in the macos-ui directory.

7.2. Manual build

7.2.1. Create the distribution archive for the mechanism

  1. Make a tarball with the required libraries and binaries from the /usr/local/moonshot directory into the Installer directory as the privileged user. The filemanifest.txt file contains the full list of required files.

7.2.2. The Moonshot Uninstaller utility

The Uninstaller utility is an Xcode project.

  1. Build the Uninstaller utility:

  2. Pay attention to the output the make uninstaller-bundle command provides. You should see something similar to this to show that the build has copied the entitlements and has signed the application:

  3. If Xcode did not sign the code and you did not disable Apple Developer ID checks in Section 5.2, Step 2, sign it manually:

  4. Verify the signing with the following command; you should have lines like these:

  5. The Uninstall Moonshot app will be in the ui/macos-ui/Uninstaller/build/Release directory. You can then copy it from there to the /Applications folder.

7.2.3. The Moonshot Installer

The Moonshot installer contains the distribution archive, the uninstaller utility, and the Moonshot identity selector.

  1. Change to the Installer folder:

  2. Copy the Moonshot identity selector app from the Applications folder to the LatestBuild directory
  3. Copy the Uninstall Moonshot app from the ui/macos-ui/Uninstaller/build/Release directory to the LatestBuild directory
  4. Copy the distribution archive you created in Section 8.1 to this directory, replacing the existing local.tar.gz file.
  5. Build the installer:

  6. Create the Moonshot distribution disk image:

  7. Copy the resulting Moonshot.dmg to your distribution point.
  8. Generate a checksum for Moonshot.dmg with the following command:

Moonshot: Commando Mac Os X

Current issues with this build include that the macOS SSH client abandons any gssapi-with-mic conversations if the first mechanism it chooses, fails.

In a domain environment, this usually involves a Kerberos interaction, i.e. where you have received a Kerberos ticket before by logging in or by running kinit. Other ssh clients (or a custom build of the ssh client) may not exhibit this behaviour.

On macOS Sierra and later, the native SSH client is sandboxed when run from its default location in /usr/bin. Making a copy of the binary in /usr/local/bin enables it to authenticate with Moonshot. Adjust /etc/paths to load binaries in /usr/local/bin first, then restart your sessions.

Currently the Moonshot Identity Manager (Moonshot.app) is not signed during the automatic build. This is due to Apple sandboxing the app when it is signed, making it impossible for it to communicate with Dbus (and by extension, the Moonshot mechanism). Not signing the app allows Moonshot authentication to proceed.