window 기반 컴퓨터에 virtual machine을 깔고 ubuntu를 설치해서 ssh로 연결하여 외부 터미널로 리눅스 제어를 해볼 것이다
virtual machine : VirtualBox
ubuntu : Ubuntu 20.04.2 LTS (카카오미러)
원격접속터미널 : MobaXterm
우분투 리눅스 다운로드
https://mirror.kakao.com/ubuntu-releases/
위 링크에 들어가서
desktop image 설치
가상머신 Virtual Box 설치
https://www.virtualbox.org/wiki/Downloads
에 들어가서
가상머신 설정
전문가 모드 > 이름 설정 > 메모리 크기 (개인 자유) > 만들기
설정 > 저장소 > 디스트 파일 선택 > 위에서 설치한 리눅스 iso 파일 선택
시작 (표시) 를 눌러서 나머지 리눅스 다운로드 진행
여기까지 진행하면 "환영합니다" 어쩌고 하면서 언어와 지역 등 설정 및 설치가 있는데 다음 / 계속하기 버튼으로 모든 설치과정을 끝낸다. (설치 시간 30분 내외 소요)
원격접속터미널로 연결하기
임베디드 개발자는 주로 cli 환경에서 작업하고 cli 가 훨씬 깔끔하기 때문에 그에 맞춰 원격접속터미널을 이용하여 우분투를 제어하고자 한다.
https://mobaxterm.mobatek.net/
원격접속 툴인 MobaXterm을 다운받는다.
ubuntu 터미널에서 ssh 연결을 위해 서버프로그램을 설치해준다.
sudo apt install openssh-server
포트포워딩을 설정하여 우분투에서 포트를 지정해준다.
설정 > 네트워크 > 고급 > 포트포워딩
포트포워딩 규칙을 추가하여 다음과 같이 설정한다.
MobaXterm에서 세션을 추가하여 설정한대로 연결해준다
Session > Remote host : localhost > Port : 22 > OK
이후 우분투에서 설치할때 설정한대로 username과 password를 치면 외부터미널에서 리눅스를 제어할 수 있다!!!
'임베디드' 카테고리의 다른 글
[GUI] Qt + SenseHat : 센스햇 조명등 GUI 어플리케이션 만들기 (0) | 2022.05.05 |
---|---|
[GUI] Qt와 QtDesingner 소개 (0) | 2022.05.03 |
[펌웨어] CubeIDE로 내부/외부 LED 켜기 (0) | 2022.05.02 |
[리눅스] 랜덤함수 rand(), srand(), time() (0) | 2022.04.30 |
[리눅스] 시그널 신호 보내기, WDT(Watchdog Timer) (0) | 2022.04.29 |