From b11a5b4bf89b8764f355f8df0dad99a96cf979dd Mon Sep 17 00:00:00 2001 From: Juntai Park Date: Fri, 15 Jul 2022 16:53:12 +0900 Subject: [PATCH] Add Prevent Mac from sleeping with terminal as a macOS TIL --- README.md | 9 ++++++++- .../prevent-mac-from-sleeping-with-terminal.md | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 macOS/prevent-mac-from-sleeping-with-terminal.md diff --git a/README.md b/README.md index 3603cae..a0c519a 100644 --- a/README.md +++ b/README.md @@ -1 +1,8 @@ -# til \ No newline at end of file +# TIL + +> Today I Learned + + +### MacOS + +- [터미널에서 맥이 잠들지 않게 하기](macOS/prevent-mac-from-sleeping-with-terminal.md) \ No newline at end of file diff --git a/macOS/prevent-mac-from-sleeping-with-terminal.md b/macOS/prevent-mac-from-sleeping-with-terminal.md new file mode 100644 index 0000000..1c78998 --- /dev/null +++ b/macOS/prevent-mac-from-sleeping-with-terminal.md @@ -0,0 +1,18 @@ +# 터미널에서 맥이 잠들지 않게 하기 + +- 실행방법 : 터미널에서 아래 명령을 실행한다. +- `caffeinate` 만 실행해도 되지만 모니터 꺼짐도 방지하기 위해 `-d` 옵션을 추가한다. + ```shell + $ caffeinate -d + ``` + +- 시간 단위 지정은 -t 옵션 (3600초 - 1시간, 21600초 - 6시) + ``` + caffeinate -t 3600 + ``` + +- 상세 옵션은 `man caffeinate` 에서 확인 가능 + +# References +- https://ss64.com/osx/caffeinate.html +- https://seorenn.tistory.com/61