Mac Os X Add App To Dock Command Line

Mac Os X Add App To Dock Command Line

Nov 23, 2019  How to Change the Dock Size on Mac. In Dock System presences pan, you can see a slider to change Dock size; if you want to big size Dock then, drag the slider from small to large side and get large Size dock on your Mac screen. A bellow of the size feature you can see, Magnification – it’s for that, whenever you move your pointer on the dock for a particular app icon at that.

The best way to find out how to use the Unix command line is to jump right into the Terminal application, which comes with OS X. Click the Launchpad icon on the Dock, click the Utilities folder, and then click the Terminal icon.

You can also jump directly to the Utilities folder from the keyboard by pressing Shift+Command+U (which displays the Utilities folder in a Finder window). Double-click the Terminal icon there. By the way, feel free to make Terminal more accessible by dragging its icon from the Utilities folder to the Dock.

Consider yourself prompted

Upon launch of the Terminal application, you’ll immediately notice some text in the window that appears onscreen, as shown in this example:

This text details the last time that you logged in to Terminal. The last line, however, is the more important one: It’s the prompt.

The prompt serves some important functions. First, it lists the current directory, which is listed as ~ in the preceding example. A tilde character (~) denotes a user’s Home directory. By default, you’re always in your Home folder each time you begin a new session on Terminal. After the current directory, Terminal displays the name of the current user, which is markchambers in this example.

As you’ve probably surmised, a folder and a directory are two different names for the same thing. Folder is the name with which most Mac users are familiar, and directory is a term that Unix power users prefer.

Line

The final character of the prompt is a $. Consider this your cue because immediately after this character is where you enter any command that you wish to execute.

Go ahead; don’t be shy. Try out your first command by typing uptime in Terminal. This shows you a listing of how long your Mac has been running since the last reboot or login. (It’s a good idea to type Unix commands in lowercase because case-sensitivity is all-important in Unix.) Your text appears at the location of the cursor, denoted by a small square.

If you make a mistake while entering the command, no worries. Just press Delete to back up, and type the characters again. If the typing error is stuck deep in a longer command, press the left- or right-arrow key to move the cursor immediately after the incorrect character and press Delete to back up; then type the correct characters. After you type the command, press Return to execute it.

In the preceding example, the computer has been running for 2 hours and 42 minutes (2:42 in line 2). Simple, eh? Immediately following the listing of the uptime command (line 3), the Terminal displays another prompt for you to enter more commands.

Prefer a different appearance for the Terminal window? Click the Terminal menu, choose Preferences, and click the Settings toolbar button to choose the color combinations for the Terminal window background and text.

A few commands to get started

As you use the command line to navigate through the various folders on your hard drive, you’ll lean on two vital commands: ls and cd. The ls command is shorthand for list, and it does just that: It lists the contents of the current directory. Enter ls at the prompt, and you see a listing of your Home folder.

The complementary cd command (again, note the lowercase) — change directory — opens any folder that you specify. It works much the same as double-clicking a folder in Finder: The difference is that following the cd command, you don’t immediately see the entire folder’s content. Too, the cd command requires a parameter (extra options or information that appear after the command) so that your Mac knows which folder to open.

For example, to open the Documents folder in your Home directory, type cd Documents and press Return. Hmm. Another prompt is displayed immediately. So where are all the files in the Documents folder? You must enter another command to see what items are in the folder that you just opened. Type your old friend ls again to see the contents of the Documents folder.

The preceding example works for a folder named with just one word. To open a folder with any spaces in its name, make sure to enclose the folder’s name in quotation marks, like this:

You can also precede a space (or any other character that the command line treats as special, such as an *) in a name with a backslash, like this:

To return to your Home folder in this example, enter a modified version of the cd command:

This causes your Mac to move back up the folder hierarchy one folder to your Home directory. By using these three simple commands — ls, cdfoldername, and cd .. — you can traverse your entire hard drive (or at least those locations where you have permission to peruse).

After you successfully enter a command, you can recall it by pressing the up-arrow key. Press the up-arrow key again to see the command prior to that, and so forth. This is an extremely useful trick for retyping extra long file paths.

Using the mouse skills you already have

Just because the Terminal is text-based doesn’t mean that it doesn’t act like a good Macintosh citizen. All the usual Mac features that you know and love are there for you to use. The familiar Copy function works anywhere, as you might expect. Paste, however, works only at the prompt position.

Drag-and-drop is also at your disposal. After you play around with the Terminal for a while, you’ll find yourself bored to tears typing the long paths that represent the files on your hard drive. To automatically enter the path of a file or folder to a command, simply drag it to the active Terminal window. The file’s full path instantly appears at the location of your cursor. (Thanks, Apple!)

You can even use the mouse while entering commands in the Terminal. Click and drag your mouse over text to select it. From there, you can copy to the Clipboard as you might expect with any other application.

On OS X, the Dock gives you a handy way of launching applications that you use the most frequently with a single click. To organize them, you can click and drag them around however you like. What you can't do, at least not directly from within the Dock's preferences, is divide up the apps using an easy visual separator. Fortunately, there's a workaround — if you're comfortable using the Terminal command line.

I've set up spaces to separate the apps I use: My Internet apps are all grouped together, as are my writing tools and creative apps, all with spaces in-between them. The other apps I still want access to are there, but out of the way.

Spaces break up the apps I use visually by function and makes it easier for me to locate them at a glance. As a result, I spend less time scanning through the Dock and more time working.

How to add a space to your Dock to separate your apps

This handy little Dock organizing trick requires the use of Terminal.

  1. Click on an empty space on your Home screen to ensure that no program is selected.
  2. Make sure that Finder is displayed in the far left corner of the menu bar.
  3. Click on Go.

  4. Select Utilities.
  5. Scroll down and double-click on Terminal when the Utilities window pops up.

  6. Type defaults write com.apple.dock persistent-apps -array-add '{'tile-type'='spacer-tile';}'; killall Dock and press return.

(You can copy the text above and paste it into Terminal if you'd prefer not to type it out.)

Mac How To Add App To Dock

That'll create a single space in your Dock. Click and drag that space wherever you'd like it to go, just as if it were a standard app icon. (But notice that if you click on that space, nothing happens — it's truly just a space.)

If you want additional spaces, just repeat the same command in Terminal. Each time you do, another space will be created.

If you decide you don't want the space, just click and drag the space out of the Dock in one fluid motion; after a couple of moments, you should see a 'remove' popup appear. It's the exact same process if you were removing an app from your dock.

We may earn a commission for purchases using our links. Learn more.

Mac Os X Add App To Dock Command Lines

Lawsuit time

Google faces privacy lawsuit over tracking users in apps without consent

Mac Os X Add App To Dock Command Line Windows 10

Law firm Boies Schiller Flexner has filed another lawsuit against Google. This time, the law firm has accused Google of tracking users in apps even after opting out.