컴퓨터를 항상 켜놓고 아침에 일어날 수 있는 좋은 방법을 찾고 있다면 간단합니다. 일반 음악 플레이어와 '잠자기' 명령만 있으면 됩니다. 'sleep' 명령은 기본 제공 도구(적어도 Ubuntu 에서는)로, 이를 통해 원하는 시간(초, 분, 시간 및 일)에 대한 타이머를 설정할 수 있습니다. '수면' 명령을 좋아하는 음악 플레이어 및 노래와 연결하면 정해진 시간 후에 깨워주는 알람을 설정할 수 있습니다. 작동 방식은 다음과 같습니다.
터미널에서 슬립 타이머 설정
먼저 터미널을 엽니다.

터미널(Terminal) 이 열리면 'sleep' 명령이 작동하는 방식을 살펴보겠습니다. 아주 간단합니다. 10초 동안 절전 모드로 전환하려면 다음 명령을 사용하세요.

10분 동안 절전 모드로 전환하려면 다음 명령을 사용하세요.

10시간 동안 절전 모드로 전환하려면 다음 명령을 사용하십시오.

마지막으로 10일 동안 잠자기 위해 다음 명령을 사용합니다.

명령을 결합할 수도 있으므로 5시간 30분 동안 잠자기를 원하면 두 시간 모두에 단일 '잠자기' 명령을 사용합니다.

그것은 간단합니다! 물론 시간이 지나면 다른 일은 일어나지 않을 것입니다. 'sleep' 명령은 수면 시간을 카운트다운하는 것뿐이기 때문입니다. 이것을 진정한 알람 시계로 만들려면 명령에 추가해야 합니다. 뮤직 플레이어의 경우 mplayer를 사용하지만 Totem(Totem) , VLC , Banshee 또는 좋아하는 음악 플레이어가 무엇이든 쉽게 사용할 수 있습니다 .
예를 들어 mplayer를 호출하려면 다음 명령을 사용합니다.

이것을 터미널(Terminal) 에 입력하면 (물론 음악 파일의 실제 경로와 이름을 대체함) 원하는 노래를 들을 수 있습니다. 물론 (자명종을 만들려고 할 때) 단점은 노래가 즉시 재생된다는 것입니다.
해결책? 'sleep' 명령어와 뮤직 플레이어를 함께 사용하세요. 두 명령을 '&&'와 결합하여 첫 번째 명령을 실행하고 완료 후에만 두 번째 명령을 실행합니다. 우리의 마지막 명령은? 우리가 8시간 동안 자고 싶다고 가정하면:

간단 해! 'sleep' 명령은 8시간 동안 기다렸다가 시간이 다되면 종료되어 음악이 실제로 재생되는 두 번째 명령이 시작됩니다. 즉석(Instant) 알람 시계.
물론 여기에는 몇 가지 단점이 있습니다. 첫째(First) 는 많은 사람들이 일정 시간이 지나면 컴퓨터가 절전 모드나 최대 절전 모드로 전환된다는 것입니다. 이것은 분명히 우리의 알람 시계에 좋지 않을 것입니다. 따라서 절전 도구를 꺼야 할 수 있습니다. 또한 잠자리에 들기 전에 볼륨 설정을 다시 확인하는 것을 잊지 마십시오. 당신의 소리가 완전히 줄어들었다면 좋은 일이 아닐 것입니다. 다음 날 아침에 일어나지 못할 수도 있습니다! 그래도 단일 명령으로 알람을 설정할 수 있다는 것은 터미널(Terminal) 을 활용하는 좋은 방법입니다 . 그것은 실제로 많은 속도, 전력 및 생산성을 제공합니다.
Terminal Tricks: Use the Terminal as an alarm clock
If you keep your compυter on all the time, and are looking for a nice way to wake up in the mоrnіng, it’s simple. All yoυ need iѕ уour regular music player and the ‘sleep’ command. The ‘sleep’ command is a built-in tool (at least in Ubuntu), that allows you to set a timer for any amount of time (ѕeconds, minutes, hours, and dаys). If we couple the ‘sleep’ command with our favorite music playеr and ѕong, then we can set an alarm that will wake uѕ up after a set amount of time. Here’s how it works.
Set Sleep Timer in Terminal
First, open your Terminal.

Once the Terminal is open, let’s go over how the ‘sleep’ command works. It’s very simple. To sleep for 10 seconds, use this command:

To sleep for 10 minutes, use this command:

To sleep for 10 hours, use this command:

Finally, to sleep for 10 days, use this command:

You can even combine commands, so if you wanted to sleep for 5 hours and 30 minutes, you would use a single ‘sleep’ command with both times:

It’s easy! Of course, once your time has elapsed, nothing else will happen, because all the ‘sleep’ command does is count down your sleep amount. To make this a true alarm clock, we’ll need to add to the command. For our music player, we’ll use mplayer, but you could just as easily use Totem, VLC, Banshee, or whatever your favorite music player is.
To invoke mplayer, for instance, we would use this command:

Typing this into the Terminal (replacing the actual path and name of the music file, of course), we would be able to listen to whatever song we want. Of course, the drawback (when trying to create our alarm clock), is that the song plays immediately.
The solution? Use the ‘sleep’ command and our music player together. We’ll combine the two commands with ‘&&’ which will run the first command, then only after it completes run the second. Our final command? Assuming we want to sleep for 8 hours:

It’s simple! The ‘sleep’ command will wait 8 hours, then when the time is up, will quit, allowing the second command – where the music is actually played – to begin. Instant alarm clock.
There are a couple drawbacks to this, of course. First is that many people have their computers to either sleep or hibernate after a certain amount of time. This obviously would not be a good thing for our alarm clock. As such, power saving tools may have to be turned off. In addition, don’t forget to double check your volume settings before heading to bed. It wouldn’t be a good thing if your sound had been turned all the way down; you might not wake up the next morning! Still, being able to set up an alarm in only a single command is a great way to take advantage of the Terminal; it really does offer a lot of speed, power and productivity.