If you’ve read Macworld for any length of time—particularly our OS X Hints blog or any other story that asks you to use Terminal—you may have wondered to yourself: How do you learn about all those mysterious commands, such as ls
or cd
? Is it some kind of arcane knowledge, handed down only to initiates after grueling initiations? Well, no. Actually, anyone can learn about Terminal commands, if they know where to look. Today, I’ll tell you where.
Man up
Dec 09, 2017 You can check to see just how long your Mac's been active by checking its uptime with this Terminal command: uptime. Keep your Mac awake. If you need to prevent your Mac from going to sleep — say, you're running an extensive task, or recording your screen — there's an all-too-amusing command for that.
The key to Terminal wisdom is the man
command. It summons manual (or man) pages for almost any command; they’re the equivalent of a help system for the command line. In fact, man
itself is a command, whose role is to format and display this documentation.
First, launch Terminal (in your /Applications/Utilities folder). Then, if you type man pwd
, for example, Terminal will display the man page for the pwd
command.
All man
pages have a common format. They begin with name (the name of the command) and a brief description of what it does. The pwd
command I looked at above shows the following:
pwd—return working directory name
Next comes synopsis, which shows the command any any options, or flags, that you can use with it. For pwd
, there are two options: -L
and -P
. These options are explained in the description section:
As you can see here, each of the two options is explained, and a final sentence tells you that the command assumes that the -L
option is desired if no other option (and there’s only one) is specified.
As you work from the command line, you’ll find that reading up on the options available for different commands is really important. You’ll learn the myriad ways you can use these tools, and some man
pages also contain examples to help you understand them.
Paging man pages
Quicken 17 for mac manual match downloaded transactions 2017. When you look at a man
page, you do so in Terminal through another command, called a pager; by default, this is the less
command. What a pager does is allow you to view content in Terminal page by page, or line by line. When you’re viewing a man
page, you will most often not see the entire page at once. You’ll need to page down to see more.
There are two ways to do this with less
. If you press Return, the page will move down one line. And if you press the spacebar, the page will scroll one page (the number of lines visible in your Terminal window). You can tell that there’s more to come by the :
(colon) visible at the bottom of the window.
Try it on your Mac: Open Terminal, type man ls
, then press Return. The ls
command’s man
page is quite long, and you’ll need to press the spacebar several times to get to the bottom.
Sometimes, when you’re viewing a man
page, you need to go back up and look at something that’s no longer visible. Depending on your Terminal settings, you may be able to scroll the Terminal window. If not, press Control-B to go back a page, and the spacebar, or Control-F, to go forward a page.
When you get to the end of a man
page, you’ll see this: (END)
. You’ll notice that you can’t do anything at that point; you need to quit the less
command; do this by pressing the q
key.
Other ways to read man pages
If you don’t want to read man
pages in Terminal, there are other ways to view this content. Carl Lindberg’s free ManOpen is a simple app that lets you view man
pages in a more attractive way than in Terminal. Press Command-O, enter the name of a command, and click Open. ManOpen is especially useful because you can choose specific sections to view from a popup menu, and you can navigate more easily than in Terminal with the less
command.
But you can also find man
pages on the Web. Just type man
and the name of a command into your favorite search engine, and you’ll get plenty of hits. Apple has a documentation repository with man
pages here. You can click Alphabetic Index to get a list of all commands, then search for the one you want. Apple’s man
pages are useful because a popup menu near the top of the page lets you choose an OS X version, so if you need to see the man
page for an older version of OS X, you can do so.
No matter which route you choose, man
pages open the door to a goldmine of information about the command line. Use them and you’ll learn all the ins and outs of the commands you use.
Welcome back to Coding Corner! Today, we're going to go over some great interface and user tweaks you can execute to customize your Mac. These tricks are often simple and can help you spruce up your Mac far beyond what the System Preferences window allows.
So, without further ado, 15 great tricks you can execute in Terminal.
Tweak the Finder
Want to see hidden files, or copy Quick Look text? There are quite a few 'defaults' commands that let you alter how the Finder looks or acts.
1. Show hidden files and folders
Want to see all the hidden files and folders OS X has to offer — or you simply can't find a file you hid? Just use this command in Terminal:
defaults write com.apple.finder AppleShowAllFiles -bool TRUE
killall Finder
To re-hide all your files, just change the TRUE
to FALSE
.
2. View any file's contents
If you've had a file get corrupted or you suspect there's something hidden inside its package, you can force Terminal to open it. Just use the following command:
cat ~/enter/file/path
Fair warning: If you try to open a photo or pretty much any non-text document, you'll likely just see text gibberish.
3. Copy the contents of a folder from one place to another
Sure, you can Option-drag any file to a new location to make a copy of it, but if you want to simplify the process and automatically copy the entire contents of one folder to another, check out this simple Terminal trick.
ditto -V ~/original/folder/ ~/new/folder/
4. Download files outside of your browser
Have the URL to a file but don't want to use Safari, Firefox, or Chrome to download it? You can go through Terminal with the following commands:
cd ~/Downloads/
curl -O http://www.thefilename.com/thefile/url.mp3
The first command moves your current Terminal location to your Downloads folder; the second downloads it from the web to that folder.
Modifying screenshots
Want to change how your screenshots look? Here are some commands to help you do just that.
Page 51 Mac OS X. To add accent marks to characters: Choose Apple System Preferences and click International. Click Input Menu, then select the checkbox next to Keyboard Viewer. Choose Show Keyboard Viewer from the Input menu on the right side of the menu bar (the one that looks like a flag or alphabetical symbol). Pages for mac manual download. Pages Support Learn what’s new in Pages for Mac and iOS Fill text with gradients or images, copy and paste pages between documents, link to other parts of your document, and more. Nov 14, 2013 Step 1: Launch Pages Click the Pages icon. Click the Pages icon in the Dock. Step 2: Choose a Template Select a template. Select a template from the list and then click Choose. For the purpose of this tutorial, I have chosen Blank. Step 3: Compose Compose your document. Pages is now ready for you to compose your document.
5. Change your screenshot's file format
This Terminal command lets you change the file format of your screenshots. By default, they're saved as PNGs, but you can also save them as PDFs, JPGs, and more.
Related Manuals for Alto MAC 2.2, MAC 2.3, MAC 2.4 Amplifier Alto MACRO 1400 User Manual Alto professional high power stereo amplifier user's manual macro 830, macro 1400, macro 2400 (13 pages). Alto mac 2.3 amp manual instructions.
defaults write com.apple.screencapture type jpg
6. Disable drop shadows on a screenshot
Here's another good one if you tend to take a lot of screenshots: This command will disable drop-shadow on your screenshots, only displaying the window you've snapped.
$ defaults write com.apple.screencapture disable-shadow -bool TRUE
killall SystemUIServer
7. Create a new default name scheme for screenshots
Don't like the phrase Apple uses to save your screenshots? Traditionally, it's 'Screen Shot - [date] - [time]', but you can change 'Screen Shot' to any word you please.
defaults write com.apple.screencapture name 'New Screen Shot Name'
killall SystemUIServer`
Get bored of your new name scheme? Go back to the default by typing as follows:
defaults write com.apple.screencapture name '
killall SystemUIServer
8. Change the location of your screenshots
Your screenshots, by default, save to the Desktop. But if you'd prefer they save elsewhere, it's an easy Terminal trick to make it so.
defaults write com.apple.screencapture location ~/your/location/here
killall SystemUIServer
You can also drag the folder of your choice on top of the Terminal window after typing 'location' if you don't want to manually type out the file path.
System changes
If you're looking for broader OS X-level changes, these commands might help you get started.
9. Create a custom login message
Whether you want to troll your friends or add useful 'in case of loss' contact information, you can add a personalized message to your login screen with this Terminal command.
sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText 'In case of loss, call 555-555-5555.'
10. How long has my Mac been running?
Is your Mac acting sluggishly? It might be in need of a good restart. You can check to see just how long your Mac's been active by checking its uptime with this Terminal command:
uptime
11. Keep your Mac awake
If you need to prevent your Mac from going to sleep — say, you're running an extensive task, or recording your screen — there's an all-too-amusing command for that:
caffeinate
Once you enter this command, your Mac's digital eyes will be pried open and prevented from going to sleep until you end it by pressing Control-C.
If you don't want to rely on being the one to end your poor Mac's suffering, you can also create a set a number of seconds before your Mac sleeps:
caffeinate -u -t 5400
The above command will keep your Mac awake for an hour and a half.
12. Make your Mac automatically restart after a crash
We've all had our Mac freeze up or crash at least once in its lifetime. If you want to skip the crying and the yelling at the screen and get back to work, you can enter this Terminal command, which will make OS X reboot as soon as it senses a full system freeze.
sudo systemsetup -setrestartfreeze on
Modify your Dock
Want to make your Dock look different? Check out these Terminal tweaks.
13. Add spacers to your Dock
You can organize your Dock's many icons by adding in blank spaces with this handy terminal command:
defaults write com.apple.dock persistent-apps -array-add '{'tile-type'='spacer-tile';}'
killall Dock
Repeat this command for each spacer you'd like for your Dock. To remove a spacer, you can drag it out to the right until you see the poof icon.
14. Dull hidden apps in the Dock
Not sure which apps are visible on your screen? You can make this information extra pertinent by using this Terminal command, which lowers the opacity on icons for hidden apps in the Dock. It's a great way to see what you haven't used lately, as well as what's cluttering up your screen.
The video referencesBasically, I'm editing the plist file that sets which resolutions are allowed. Manual resolution mac. I think I may have solved this problem, after a lot of experimentation, but I only have one system to test it on.
defaults write com.apple.Dock showhidden -bool TRUE
killall Dock
15. Hide non-active apps in your Dock
If lowering the opacity of hidden apps appeals to you, you might like this Terminal command even better: It hides any closed app from your Dock at all times.
https://clothesomg.netlify.app/mac-os-10116-unable-to-set-office-updates-to-manual.html. defaults write com.apple.dock static-only -bool TRUE
killall Dock
Your favorites?
Mac Terminal Commands Pdf
Have a Terminal command you love that we didn't mention? Drop it below in the comments.