Tools

tmux란 무엇인가? tmux 개념과 설치 방법

movefun-tech 2023. 7. 4. 23:52
반응형

공식홈페이지

https://github.com/tmux/tmux/wiki

 

Home

tmux source code. Contribute to tmux/tmux development by creating an account on GitHub.

github.com

 

tmux란 무엇인가?

tmux의 github 사이트에 들어가면 아래와 같은 메시지가 나옵니다.

Welcome to tmux!

tmux is a terminal multiplexer. It lets you switch easily between several programs in one terminal, detach them (they keep running in the background) and reattach them to a different terminal.
tmux는 terminal multiplexer(터미널 멀티플렉서)입니다. 이것은 당신이  하나의 터미널과 몇몇의 프로그램 사이에서 쉽게 전환하고 분리(백그라운드에서 계속 실행)하고, 다른 터미널에 다시 연결할 수 있습니다.

 

주로 여러 창을 분할해서 한 눈에 보기 위해 사용합니다.

 

다음은 tmux의 주요 용도를 살펴보겠습니다.

  1. Protect running programs on a remote server from connection drops by running them inside tmux.
    원격 서버에서 실행 중인 프로그램을 tmux 내에서 실행하여 연결 끊김으로부터 보호합니다.
  2. Allow programs running on a remote server to be accessed from multiple different local computers.
    원격 서버에서 실행 중인 프로그램을 여러 로컬 컴퓨터에서 액세스 할 수 있습니다.
  3. Work with multiple programs and shells together in one terminal, a bit like a window manager.
    창 관리자와 같이 하나의 터미널에서 여러 프로그램과 셸을 함께 사용합니다.

저는 이 중에서 3번째 용도로 사용 할 예정입니다.

 

tmux 설치하기

tmux를 설치하겠습니다. 플랫폼에 따라 설치 명령이 다를 수 있습니다. 저는 앞에서 설치했던 우분투 버전에 tmux를 설치하겠습니다. 우분투 설치 방법은 아래 글을 클릭해주세요.

2023.05.08 - [Tools] - VMware 가상머신 및 리눅스 우분투(Ubuntu) 설치 방법

 

설치를 위해서는 apt를 사용할 예정입니다. 따라서 apt를 먼저 업데이트 해주겠습니다.

$ sudo apt update
$ sudo apt upgrade

 

이를 완료한 후에 tmux 설치 명령을 입력하겠습니다.

$ sudo apt install tmux

설치가 완료되었습니다.

 

간단 사용법

아주 간단한 사용법을 알아보겠습니다. 먼저 분할하고 싶은 터미널에서 아래 명령어를 입력하세요.

$ tmux

 

그 다음은 단축키를 이용해 창을 분할할 수 있습니다.

[사진1] tmux로 창 분할한 모습

[ctrl]+[b] [%] : 현재 창 수평 분할

[ctrl]+[b] ["] : 현재 창 수직 분할

 

창 선택 후 터미널에 exit 명령 -> tmux 나가기(창 없어짐)

 

자세한 사항은 아래 링크를 참고하세요.

https://github.com/tmux/tmux/wiki/Getting-Started

 

Getting Started

tmux source code. Contribute to tmux/tmux development by creating an account on GitHub.

github.com

 

반응형