How To Fix: Could not get metalink for EPEL

Quick Fix

Error message:

Could not get metalink https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=x86_64 error was 14: HTTPS Error 503 - Service Unavailable

Fix:

sudo rpm --query --file  /etc/pki/tls/certs/ca-bundle.trust.crt

Output (will change as time goes on):

ca-certificates-2018.2.22-70.0.el7_5.noarch

Copy and paste output, and then run:

sudo yum reinstall ca-certificates-2018.2.22-70.0.el7_5.noarch

Then try yum update again.

 

 

 

 

 

macOS How To: Update your Mac in Terminal

When updating your Mac, you usually have to go through the App Store to do it. This can be annoying because it takes around 20 minutes to do each update and you can’t use your Mac at the same time. But did you know there’s a way to do it via the command line interface?

The utility you can use to do this is called ‘softwareupdate’ and it’s pretty powerful, but we only need one command to check for and install updates:

softwareupdate -ia

If you’re interested in the other features this utility offers, you can run:

softwareupdate -?

Tips:

If you’re interested in being able to check for updates and install them and then reboot automatically afterwards you can add the following line to your ~/.bash_profile file with your favourite text editor such as ee, vim, or nano.

alias update='sudo sh -c "softwareupdate -ia && reboot"'

Then save and exit the file and run the following to re-load your .bash_profile file.

source ~/.bash_profile

macOS How To: Use Touch ID to authenticate as sudo in Terminal

TL;DR: 

To authenticate as sudo in Terminal, paste the following line into /etc/pam.d/sudo

auth       sufficient     pam_tid.so
Step-by-step Instructions:

Firstly you’ll need to open /etc/pam.d/sudo in a file editor within Terminal. You can do this by running the following command:

sudo vi /etc/pam.d/sudo

Then, press the key on your keyboard, this will allow you to insert text.

Then, paste the following line into the file – you’ll need to use the keyboard for navigating around the file, but you can use the right click context menu to paste (or CMD or Edit > Paste).

I made a new line below the first line, but it can go anywhere as long as it’s on a new line:

auth       sufficient     pam_tid.so

Then, press the escape key on your keyboard. Then type :wq! and press enter. This will save the changes to the file.

Lastly, quit Terminal by pressing CMD + Q. Then relaunch Terminal and run a command as sudo (e.g; sudo -i to change to root in Terminal) to test.

macOS How To: Bypass Gatekeeper for “App cannot be opened. You should move it to trash.”

To bypass Gatekeeper and open an app when “App cannot be opened. You should move it to trash.” comes up, simply open Terminal (Applications > Utilities > Terminal) and run the following command:

sudo xattr -r -d com.apple.quarantine /Applications/name of app.app

You’ll need to replace name of app.app with the name of the application you’re trying to open.

You can find this out by going to the Applications folder and finding the first few letters of the app name, you can then auto-complete the name in Terminal by pressing the tab key (above Capslock) in Terminal after typing the first few letters of the name of your app.

Example: Type the following, and then press tab:

sudo xattr -r -d com.apple.quarantine /Applications/Microsoft Wor

macOS will autocomplete it to:

sudo xattr -r -d com.apple.quarantine /Applications/Microsoft Word.app

Mac How To: Find Your Mac’s Processor/CPU Model Number

On macOS, going to the System Profiler doesn’t give you the exact model number of your CPU, rather it just gives you the clock speed and the CPU branding (e.g; Intel Core i7).

You can, however, use Terminal to find the exact model number of your CPU. Just open up Terminal (Applications > Utilities > Terminal or use Spotlight to search for it) and run the following command:

sysctl -n machdep.cpu.brand_string

Mac How To: Prevent your Mac from sleeping with Terminal

From time to time you may want to prevent your Mac from sleeping without having to go into Settings and turn off Energy Saving mode.

Thankfully, there’s another way to keep your Mac awake. All you need to do is run a single command in Terminal called caffeinate.

Continue reading

Mac How To: Make a USB macOS (or OS X) Installer (10.11.x-10.13.x)

NOTICE: This article has been updated for macOS Sierra and macOS High Sierra - I've included OS X El Capitan, macOS Sierra, and macOS High Sierra instructions for any stages with different requirements or commands.

At the time of writing, Apple still don’t offer a simple utility one can use to create a bootable USB installer for OS X. However, that doesn’t mean you need to take your Mac into an Apple Store to get OS X re-installed.

Continue reading

Mac How To: Change where screenshots are saved

By default OS X saves screenshots to your desktop, this can be very annoying but thankfully it’s very easy to change with just a quick command in Terminal.

Put the following command into Terminal (replacing ‘/Users/jon/Pictures/Screenshots/’ with the location you want screenshots to be saved to):

Continue reading

Mac How To: Redirect a folder in your home directory with symbolic links

I’m the kind of person that likes to have all of his documents easily available on all of his computers. For this I choose to use Microsoft OneDrive. In Windows it’s very easy to change the location of my Documents, Photos, and Music folder to folders within the OneDrive directory so whenever a change is made to something or a file is added/deleted, these changes are automatically mirrored across all of my connected devices. It works great.Continue reading

Mac How to: Make your MacBook Pro or MacBook Air chime when you plug it in

You need OS X Yosemite 10.10.3 or above to do this.

You probably know that when you plug one of the new 12inch MacBooks into a power source it’ll make a chime noise (the same as iPhones and iPads). But did you know you can make your MacBook Pro or MacBook Air do the same thing? All you need is OS X Yosemite 10.10.3 or later and you can enable this cool little trick with 1 quick line in Terminal. It’s also extremely easy to turn it back off again if it gets on your nerves.

Continue reading