본문 바로가기
로보틱스/라즈베리파이

우분투(Ubuntu) 설치 [라즈베리파이(Raspberry Pi)]

by J-Build 2020. 9. 13.

이번 포스팅에선 라즈베리파이4에 우분투를 설치하고 ssh로 원격접속 하는 방법을 알아보겠습니다. 모니터와 키보드 및 마우스가 없어도 설치가 가능합니다.

 

우분투 라즈베리파이의 공식 설치 튜토리얼은 아래 링크에서 확인가능합니다. 

https://ubuntu.com/tutorials/how-to-install-ubuntu-on-your-raspberry-pi

 

라즈베리파이에 Raspberry Pi OS(이전에는 Raspbian 이라고 불렸어요)를 설치하고 싶다면 아래 링크를 확인하세요. 

2020/08/25 - [라즈베리파이] - 라즈베리파이(Raspberry Pi) 시작하기

 

준비물

  • 라즈베리파이 3 또는 4
  • Micro SD 카드(최소 4GB, 8GB 이상 추천) 및 리더기
  • 랜케이블
  • 인터넷이 되는 컴퓨터

 

Raspberry Pi OS Imager 다운로드

준비가 다 되었으면 라즈베리파이 공식 사이트에서 Imager 프로그램을 다운로드 받아야 합니다. 이 프로그램은 아래 링크에서 다운로드 할 수 있습니다.  

https://www.raspberrypi.org/downloads/

 

Raspberry Pi Downloads - Software for the Raspberry Pi

Download free software for Raspberry Pi, including Raspberry Pi Imager, Raspbian, and third-party OS images. Beginners should start with Raspberry Pi Imager

www.raspberrypi.org

 

아래와 같이 화면이 보이면 Raspberry Pi Imager를 다운로드 하세요. 저는 Mac 컴퓨터를 사용하고 있어서 Mac 용 Imager 를 다운로드 받았습니다. 윈도우를 사용하고 계시면 Windows를 선택하세요. 

 

Imager 프로그램을 설치 후 실행해 주세요. 그리고 아래와 같이 OS에서 Ubuntu를 선택해줍니다. 저는 Ubuntu 20.04.1 LTS 64 bit를 선택했습니다. 

 

라즈베리파이 부팅

이미지 굽기가 완료되었다면 SD카드를 라즈베리파이에 삽입해주세요. 그리고 랜케이블을 라우터(인터넷 공유기)와 라즈베리파이에 연결해주세요. 그리고 전원을 인가해주세요. 그리고 공유기 설정에 들어가서 라즈베리파이가 어떤 IP를 할당 받았는지 확인해 주세요. 제 라즈베리파이는 192.168.1.6을 할당받았습니다. 또는 터미널에서 아래의 명령으로도 확인이 가능합니다.

arp -na | grep -i "b8:27:eb"	# 라즈베리 3 이하 모델이라면 이 명령을 사용
arp -na | grep -i "dc:a6:32"	# 라즈베리 4 이상 모델이라면 이 명령을 사용

 

이제 SSH로 원격접속을 해볼께요. 라즈베리파이에 설치된 우분투의 기본 로그인 아이디와 패스워드는 ubuntu 입니다.

➜  ~ ssh ubuntu@192.168.1.6
You must change your password now and login again!
Changing password for ubuntu.
Current password:
New password:
Retype new password:
passwd: password updated successfully
Connection to 192.168.1.6 closed.

 

처음 접속을 하면 패스워드를 바꿔야 합니다. 현재 패스워드인 ubuntu를 한번 입력 후 새로운 패스워드를 두번 입력해주세요. 그러면 연결이 종료됩니다. 이제 다시 접속을 해보면 연결이 됩니다. 

➜  ~ ssh ubuntu@192.168.1.6
ubuntu@192.168.1.6's password:
Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-1015-raspi aarch64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Mon Sep 14 23:14:50 UTC 2020

  System load:           0.47
  Usage of /:            16.9% of 14.30GB
  Memory usage:          10%
  Swap usage:            0%
  Temperature:           56.5 C
  Processes:             138
  Users logged in:       0
  IPv4 address for eth0: 192.168.1.6
  IPv6 address for eth0: 2407:7000:8815:6a12:dea6:32ff:fe21:9ab1
  IPv6 address for eth0: 2407:7000:8815:6a19:dea6:32ff:fe21:9ab1
  IPv6 address for eth0: 2407:7000:8815:6a00::2
  IPv6 address for eth0: 2407:7000:8815:6a34:dea6:32ff:fe21:9ab1
  IPv6 address for eth0: fdd4:40f0:44c2:db00:dea6:32ff:fe21:9ab1

 * Kubernetes 1.19 is out! Get it in one command with:

     sudo snap install microk8s --channel=1.19 --classic

   https://microk8s.io/ has docs and details.

30 updates can be installed immediately.
0 of these updates are security updates.
To see these additional updates run: apt list --upgradable


*** System restart required ***
Last login: Mon Sep 14 23:14:35 2020 from 192.168.1.11
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ubuntu@ubuntu:~$

 

연결에 성공했습니다~! 

 

그럼 즐파이 하세요~!! 

 

 

댓글