window 기반 컴퓨터에 virtual machine을 깔고 ubuntu를 설치해서 ssh로 연결하여 외부 터미널로 리눅스 제어를 해볼 것이다
virtual machine : VirtualBox
ubuntu : Ubuntu 20.04.2 LTS (카카오미러)
원격접속터미널 : MobaXterm
우분투 리눅스 다운로드
https://mirror.kakao.com/ubuntu-releases/
Ubuntu Releases
There are 2 types of Ubuntu releases: Interim and LTS. Each Ubuntu LTS is maintained for 10 years total: 5 years of standard support + 5 years of ESM. Interim releases are maintained for 9 months. For the Ubuntu release cycle please see: The Ubuntu lifecyc
mirror.kakao.com
위 링크에 들어가서
desktop image 설치
가상머신 Virtual Box 설치
https://www.virtualbox.org/wiki/Downloads
Downloads – Oracle VM VirtualBox
Download VirtualBox Here you will find links to VirtualBox binaries and its source code. VirtualBox binaries By downloading, you agree to the terms and conditions of the respective license. If you're looking for the latest VirtualBox 6.0 packages, see Virt
www.virtualbox.org
에 들어가서
가상머신 설정
전문가 모드 > 이름 설정 > 메모리 크기 (개인 자유) > 만들기
설정 > 저장소 > 디스트 파일 선택 > 위에서 설치한 리눅스 iso 파일 선택
시작 (표시) 를 눌러서 나머지 리눅스 다운로드 진행
여기까지 진행하면 "환영합니다" 어쩌고 하면서 언어와 지역 등 설정 및 설치가 있는데 다음 / 계속하기 버튼으로 모든 설치과정을 끝낸다. (설치 시간 30분 내외 소요)
원격접속터미널로 연결하기
임베디드 개발자는 주로 cli 환경에서 작업하고 cli 가 훨씬 깔끔하기 때문에 그에 맞춰 원격접속터미널을 이용하여 우분투를 제어하고자 한다.
https://mobaxterm.mobatek.net/
MobaXterm free Xserver and tabbed SSH client for Windows
The ultimate toolbox for remote computing - includes X server, enhanced SSH client and much more!
mobaxterm.mobatek.net
원격접속 툴인 MobaXterm을 다운받는다.
ubuntu 터미널에서 ssh 연결을 위해 서버프로그램을 설치해준다.
sudo apt install openssh-server
포트포워딩을 설정하여 우분투에서 포트를 지정해준다.
설정 > 네트워크 > 고급 > 포트포워딩
포트포워딩 규칙을 추가하여 다음과 같이 설정한다.
MobaXterm에서 세션을 추가하여 설정한대로 연결해준다
Session > Remote host : localhost > Port : 22 > OK
이후 우분투에서 설치할때 설정한대로 username과 password를 치면 외부터미널에서 리눅스를 제어할 수 있다!!!
[리눅스] 쉘 스크립트 : Bash Shell 시작하기, 쉬뱅
쉘 스크립트 쉘 스크립트는 쉘에서 실행하는 스크립트 프로그래밍 언어이다. if, for, 변수, 함수 등을 사용해서 프로그래밍이 가능하다. CLI Shell은 여러가지가 존재하는데, /etc/shells 에 실행가능
asdfmelody.tistory.com
'임베디드' 카테고리의 다른 글
[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 |