Sunday, 21 February 2021

Don't let your MAC sleep | Cool terminal commands Part2

 Hey, have you ever faced an issue where you don't want your MAC to enter into sleep mode.


Here is the solution.

  1. Open the terminal by typing 'terminal' in the spotlight and press return.
  2. Type "caffeinate -t 18000" in the terminal. This will keep your MAC awake for 18000 miliseconds or 5 hours. If you want to wake it up before that, hit CMD+C.
  3. If you want to make it awake for undetermined time, type only caffeinate and hit CMD+C when you want to awake.

  ~ caffeinate -t 18000

Let your MAC speak | Cool terminal commands Part1

This might sound strange, but you can actually make your MAC speak.

There is a command say

Open the terminal, type "terminal" in the spotlight, and hit enter. This will open up the terminal.

Type 'say' in the terminal and press enter.

It enters into the prompt state, now it will speak whatever you type.

Try typing "Hello world", your intelligent MAC will speak the exact words.

Press CMD+C when you wish to exit.


  ~ say

Hello Shubham, it's your mac talking





~Kindly let me know in the comments section if you find this interesting. Happy coding :)