Some of the most useful commands for the OS X terminal on Mac

Mac-Terminal-commands-0

For all of those to whom computing is somewhat more familiar to us at times when there was not this 'boom' of mobile and desktop technology, always we will remember with nostalgia from the command console when it was the only way to access directories or files. That has not completely disappeared yet and is that for certain aspects of the operating system, we will need dip into the terminal to achieve our goals.

Still we have to accept that modern computing has reached such a point of sophistication that every time graphical interfaces are simpler and everything is more within the reach of the user, never better said, with the fashion now of doing everything or 'almost' everything by touch and making it more intuitive and natural with each edition. But as I have already said, let's see how with some commands not available through the 'normal' options we can remove the shadows from the screenshots or simply show hidden files.

The first thing to open the terminal will be to go to the Applications> Utilities> Terminal menu. From here we can start testing different options.

Make your Mac talk

say "whatever you want to put next"

Play games

As Mac is an interpretation based on Unix, it has 'dragged' many of the games that it brought. Emacs, a text editor that is part of the UNIX system, comes with a couple of surprises like these games. To see how to do this, it is simple, first you have to see what version of Emacs you have

cd / usr / share / emacs /; ls

This will show the version number. Mine is 22.1. Now enter the following:

ls /usr/share/emacs/22.1/lisp/play

Replace 22.1 with the number you obtained in the previous step, they do not have to be the same, this way you will get a directory of all available games. Take a screenshot of what it shows to know which ones are available by version.

Mac-Terminal-commands-1

Now we enter the command:

emacs

To access the games, press 'Esc' and then 'x' and enter the name of the game you want to play, just the name because extensions are not necessary.

Mac-Terminal-commands-2

See Star Wars in ASCII

If we are talking about nostalgia, nothing better than seeing a Star Wars scene in ASCII code, so if we have IPV6 on our Mac, we can see it colored or even through SSH and Telnet on an iPhone.

telnet towel.blinkenlights.nl

 Mac-Terminal-commands-3

Change how often the system is backed up

With this command we can modify the time in which Time Machine will start up to start the backup:

sudo defaults write / System / Library / Launch Daemons / com.apple.backupd-auto StartInterval -int 1800

Keep in mind that 1800 is expressed in seconds, which would be equivalent to 30 minutes.


Resize image preview Resolution 

If you change through different previews you will notice that the image itself resizes each time to fit the size of the image at that time. We can solve it with this simple command:

defaults write com.feedface.ffview udn_dont_resize_img_win 1

If we want to undo this change again, it will be enough to change the value 1 to 0

 defaults write com.feedface.ffview udn_dont_resize_img_win 0


Recent apps

If you want to create a shortcut in the Dock to see your recent applications you can do it like this:

defaults write com.apple.dock persistent-others -array-add '{"tile-data" = {"list-type" = 1; }; "Tile-type" = "recents-tile"; } '; killall Dock

To remove it, simply drag it out of the dock.

Mac-Terminal-commands-5

Rename screenshots

In general, OS X names the screenshots with their number and the date and time it was created, let's see how to change it:

defaults write com.apple.screencapture name "How do you want to name it"; killall SystemUIServer

If you want to go back to the original

defaults write com.apple.screencapture name ""; killall SystemUIServer

Show hidden files

By default there are hidden files within the system, which we will not be able to see unless we enter the following command or through some iVisible type program.

defaults write com.apple.finder AppleShowAll Files TRUE; killall finder

To revert it and hide them again we will change to FALSE

defaults write com.apple.finder AppleShowAll Files FALSE; killall finder

Enable Airdrop on older Macs

By default Airdrop only comes as a protocol on modern Macs and not all have this feature to share files. To enable it:

defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool TRUE; killall finder

To reverse the change

defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool FALSE; killall finder

Disable 'two finger' gesture to navigate with Chrome

Chrome has this peculiarity that if you pass in one direction with two fingers, we will take you to the previous or the next one (depending on the gesture), if you don't want this gesture, it can be deactivated with a simple command.

defaults write com.google.Chrome.plist AppleEnableSwipeNavigateWithScrolls -bool FALSE

As always to reverse the change

defaults write com.google.Chrome.plist AppleEnableSwipeNavigateWithScrolls -bool TRUE

Edit text in Quick Look

Something very useful is the ability to edit it when viewing a document in Quick Look, it would be much more complete than then opening another program if it involves two tweaks, so to enable it we will do the following:

defaults write com.apple.finder QLEnableTextSelection -bool TRUE; killall finder

To reverse

defaults write com.apple.finder QLEnableTextSelection -bool FALSE; killall finder

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.