2016년 5월 14일 토요일

[앤써북 이벤트] 아두이노 드론 만들고 직접 코딩하기





한이음 프로젝트 수행 당시 가장 관심있었던 주제는 "드론"


여러 오픈소스도 많이 있지만 처음부터 내가 만들어보고 싶다는 생각은 버릴수가 없었다.


그래서 부품도 따로 사서 만들어보려고 했지만 1부터 100까지, A부터 Z까지 관련 지식도 없이 덤비는 건 무모했고




결국 실패했다.


미련이 남아서 KAIST 드론 챌린지에 참여해서 CC3D라는 모듈을 써서 openpilot 프로그램으로 드론을 제작하는 기회를 가졌고 특별상도 받을 수 있었다.


이 책이 출간되고 서점으로 바로 달려가서 보니 배경 지식과 상세한 설명, 그림을 통해 쉽게 익힐 수 있는 구성이 마음에 들었다.


부품만 사놓고 직접 만들어보지 못했던 드론... 켜켜이 묵은 먼지를 털고 다시 한 번 하늘을 날아봐야겠다!


=====================================================================


아두이노 드론 만들고 직접 코딩하기


아두이노로 드론 만들고, 드론 소프트웨어 직접 구현하여 날리기



"직접 코딩하면서 아두이노 드론 하드웨어와 소프트웨어를 이해한다"





교보문고 링크


예스24 링크


인터파크 도서 링크

2016년 3월 27일 일요일

MySQL 언어 설정

링크 참고 : link

show variables like '%character%';
show variables like 'collation%';


# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:\mysql\data) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
default-character-set = utf8
port = 3306

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
default-character-set=utf8
character-set-server=utf8
skip-character-set-client-handshake

port = 3306
skip-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
skip-innodb

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking

# Replication Master Server (default)
# binary logging is required for replication
#log-bin=mysql-bin

# binary logging format - mixed recommended
#binlog_format=mixed

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
#server-id = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id       = 2
#
# The replication master for this slave - required
#master-host     =   <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user     =   <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     =  <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin

# Point the following paths to different dedicated disks
#tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname


# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = C:\mysql\data/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = C:\mysql\data/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

[mysqldump]
default-character-set = utf8
quick
max_allowed_packet = 16M

[mysql]
default-character-set = utf8
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout
=====================================================
apmsetup 설치 후 발생하는 초보자들의 좌충우돌 미친 삽집 

  이 사이트가 기존 질문과 답변 게시판에 있는 글을  검색하는 게 너무 어렵고
 짜증나서  
 내가 겪는 문제면 다른 사람도 겪는 거라 생각해서 적습니다.
 정말 이런곳에 적지 않는 귀차니즘 주의자지만
apmsetup을 설치할때마다 느끼는 고통이라 적습니다(자꾸 까먹어서 그렇지만.ㅎㅎ , 항상 몇시간을 끙끙된다)

이글은 정말 초보자들을 위한 착한 사람의 봉사 
apm_setup 관리자 비번 바꾸는건
apm_setup 모니터(빨간얼굴 히죽웃는 프로그램말이유~)
환경설정에 가서 바꾸는건 다 알거라 생각합니다.

문제는 ~
phpmyadmin 비번 변경이 처음엔 젤 많이 겪는 문제지
나온 화면 오른쪽 상단에 보면 phpmyadmin 이 있으니 그걸 누르면
phpmyadmin  이 나옵니다.
이거의 비번은 apmsetup이죠
비번을 바꿔야하는데
처음은 root 에 apmsetup 을 넣고 드가면 드갑니다.

 이건 다 알잖아 . 다른 놈도 알고 며느리도 알고.
 암호 바꿔야지 -> 1234로 바꿔야지
암호변경을 선택하고 변경했다.
안돼!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!꾸끼 어쩌구 어쩌구 한다. 시불
 자주하는 질문에 가서 본 건 시불 몬소리인지 도체 알수 없다. 짱난다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 해결은 C:\APM_Setup\Server\phpMyAdmin   에 있는 config.inc.php 에서 controlpass 를 검색해서 처음으로 나오는 놈
$cfg['Servers'][$i]['controlpass']   = '1234';          // access to the "mysql/user"
1234로 바꿔준다.
저장하고
 으악 확힌해보자
 안될 이유가 없다.!~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

다음날 (보통 여기 안된다고 적는 사람들 보면 다음날 컴퓨터를 키니 mysql 중지됨 이라고 계속 뜬다고 말한다)
히죽웃는 빨간 얼굴의 apmsetup 모니터에 mysql 이 시작이 안된다.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   phpmyadmin 비번 변경 후 그냥 어쩌다가 apmsetup 모니터 프로그램을 껐다가 다시 꼈을 경우
   아니면 그냥 mysql 서버를 다시 시작눌렀는대 중지중 이라고 만 뜨고 그냥 있을 경우~

   대부분 phpmyadmin 비번 변경후에 ~
   apmsetup 환경설정에 mysql 탭에 관리자 비번을 변경하지 않아서 그렇다.
  중요한건 대부분 phpmyadmin 비번 변경하고 그냥
  apmsetup 프로그램을 종료 시키거나 혹은 심심해서 만지다가 끄게 된다
 그러면  mysql 서버는 중지중이라고만 뜨고 배째버려서 강제종료하게 되는데
 그러고 나서는 절대 다시 mysql 서버 실행됨을 보지 못한다.
그러하여 재설치의 무한루프에 빠지지
 이유는 모른다. ㅎㅎㅎ

그러니깐 phpmyadmin 비번바꾸고
바로 
apmsetup 환경설정에서 mysql탭에 관리자 비번도 똑같게 ! 바꾸고
나서야 마음대로  mysql서버를 중지하고 실행해도 된다.

그러면 비번때문에 생기는 개 황당하고 어이없고 그지 같은 경우는 없을것같다.
단.완존 컴맹은 제오ㅣ



현재 세팅상황(한글 출력O)
# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:\mysql\data) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
default-character-set = euckr
port = 3306

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
default-character-set=euckr
init_connect=SET collation_connection=euckr_korean_ci
init_connect=SET NAMES euckr
character-set-server=euckr
collation-server=euckr_korean_ci


port = 3306
skip-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
#skip-innodb

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!

#skip-networking

# Replication Master Server (default)
# binary logging is required for replication
#log-bin=mysql-bin

# binary logging format - mixed recommended
#binlog_format=mixed

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
#server-id = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id       = 2
#
# The replication master for this slave - required
#master-host     =   <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user     =   <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     =  <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin

# Point the following paths to different dedicated disks
#tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname


# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = C:\mysql\data/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = C:\mysql\data/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

[mysqldump]
default-character-set = euckr
quick
max_allowed_packet = 16M

[mysql]
default-character-set = euckr
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout


ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost'

go this link : link


2016년 3월 7일 월요일

a401 프린팅 설정하기

신도리코 M401 윈도우8.1(10) 환경에서 드라이버 설치

우선 이 포스트는 신도리코에서 소정의 무엇을 받아서 작성하는 것이 아니라 간간히 이 문제로 어려워하시는 분들을 몇몇 분들을 보아 도움을 드리고자 하여 작성함을 알려드립니다.

신도리코 M401 구입하셨을 때 동봉된 CD가 두 장 있으셨을거예요 ㅎ
한 장은 드라이버 CD이고 다른 한 장은 스캐너 응용프로그램 CD인데요 그 중 드라이버 CD는 윈도우7용이랍니다. ㅎㅎ 당연히 윈도우8 상에서는 드라이버 안 잡히죠 ㅋㅋ

일단 드라이버를 구하기 위해 신도리코 홈피로 접속합니다.


여기서 중요한 정보가 하나 있습니다!

드라이버를 M401로 받으시는게 아니라 M402 드라이버를 받으셔야합니다!
전에는 M401드라이버(디지털서명이 되어있지 않음)를 드라이버서명 시행 해제 후 설치하면 됐었는데 지금은 무슨 문제인지는 몰라도 윈도우 업데이트 후 드라이버 설치가 안되어버리는 불상사가 생기고 말았습니다. 그래서 부득이하게 M402드라이버로 받습니다.


Windows 8 (32, 64) / Windows 8.1 (32, 64)
네 가지 운영체제에서 Print Driver(LAN FAX 가능) v56 파일은 모두 같습니다.

파일을 받아서 편한 위치에서 압축을 풀어줍니다.


위와 같이 폴더 두 개가 확인이 되면 맞게 받으신 겁니다.
드라이버가 들어있는 폴더는 2k_xp_vista_w7 폴더입니다.

이제 제어판으로 가셔서 장치 및 프린터를 더블클릭합니다.




프린터 추가를 클릭합니다.


위와 같은 화면이 뜨면 순서대로 클릭합니다.


쭉 따라오세요.


기존 포트 사용에 체크되어있나 확인하시고 포트를 USB 가장 첫 번째 있는 포트로 잡아줍니다. 보통 USB000입니다. 다음 클릭합니다.



순서대로 잘 따라오세요.


위와 같이 드라이버를 다운받은 경로에서 포스팅 초반에 언급한 2k_xp_vista_w7 폴더까지 더블클릭해서 들어옵니다. 파일 이름에 sdoakrh.inf 파일이 맞는지 확인하고 열기 누릅니다. (경로만 맞게 들어왔다면 100% 이 파일입니다.)



신도 M402_408 드라이버가 맞는지 확인하고 다음으로 넘어갑니다.


프린터 이름 설정하시고


공유 여부 설정하시고 다음으로 넘어갑니다.


벌써 마지막 화면이네요 ㅋ
설치가 잘 되었는지 확인하기 위해 테스트 페이지 인쇄를 누르고 마칩니다.



......???????????


당연히 프린트가 안됩니다. ㅋㅋㅋ M401드라이버가 아니기 때문이죠.
허나!!! 당황하지 마시고 간단한 설정 하나로 프린트가 가능해집니다.

다시 한 번 제어판 – 장치 및 프린터로 들어갑니다.


뭐가 하나 생겼죠?ㅎㅎ 방금 설치한 프린터입니다.ㅋ
마우스 오른쪽 클릭하시고 프린터 속성 클릭해주세요.


프린터 속성이 뜨면 포트 탭으로 이동합니다.


지금 상태는 USB000 포트에 체크가 되어있습니다. 맞죠? 당연합니다. 방금 전에 USB000포트로 설정했으니깐요. 이제 USB001 또는 USB002, USB003 등등 바로 아래 있는 체크되어있지 않은 USB포트 체크박스를 클릭하고 적용을 누르는 순간!!!

반응 오죠?ㅋㅋㅋ

아까 보낸 테스트페이지가 인쇄가 되는 역사를 경험하실 겁니다 ㅎㅎ
확인 누르시고 그대로 쭈~~~욱 사용하시면 됩니당 ㅋㅋ

어떤 원리로 이런 설정으로 인해 다른 드라이버가 정상작동하는지는 저도 잘 모릅니다.ㅋㅋ
사용하시는데는 아무 지장없으나 양면인쇄할때는 어떨지 모르겠습니다. 저도 아직 양면인쇄는 안해봤는데 M401은 수동양면인쇄고 M402는 자동양면인쇄인데 M402드라이버를 잡아놨으니 자동양면인쇄 설정밖에 없죠.ㅋ 이 부분은 저도 아직 경험해 보지 않았으니 사용하시는 분이 알아가시기를 바랍니다 ^^

윈도우 8.1 환경에서는 번들 프로그램으로 따라온 스캔프로그램인 PaperPort 11 도 사용하기가 까다롭죠. ㅋ 설치해도 스캔이 실행이 안돼서 신도리코 홈페이지에서 윈도우8.1용 페이퍼포트 보조 프로그램을 받아서 실행을 해줘야지 그제서야 스캔이 된답니다. 여러모로 불편하죠..ㅋㅋ
저도 그대로 사용하다가 ADF에서 스캐닝을 하면 페이퍼포트 프로그램이 오류가 떠서 먹통이 되는 불상사를 경험했다죠. 짜증나서 인터넷에서 PaperPort 14 프로그램 구해서 사용하고 있답니다. ㅎㅎ 상위버전이라 8.1에서 아무 오류없이 깔끔하게 잘 구동이 되더라구요 ㅎㅎ 근데 한글판을 못 구해서 ㅜㅜ 짧은 영어지식으로 사용중이랍니다 ㅋㅋ 기존 페이퍼포트11버전 사용자라면 사용하는데 어려움이 없더라구요 ㅎㅎㅎ

포스팅하다보니 말이 길어졌네용 ㅋㅋ
아무쪼록 이 M401복합기를 이용하는 사용자들이 불편하지 않게 속히 정상적인 드라이버가 업데이트 되었으면 하는 바람입니다.
이 키워드를 검색하시는 분이 몇 분이나 될지는 모르겠지만 제 포스팅이 필요하신 분께 도움이 되면 좋겠다는 마음가짐으로 포스팅을 마칩니다. ^^

2016년 3월 5일 토요일

[Solved]CRTC 63: trying mode 1920x1080@60Hz with output at 1920x1280@60Hz

my pc's OS is Ubuntu 14.02 LTS




Could not apply the stored configuration for monitors
none of the selected modes were compatible with the possible modes:
Trying modes for CRTC 63
CRTC 63: trying mode 2560x1700@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 2048x1536@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 1920x1440@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 1856x1392@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 1792x1344@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 1920x1200@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 1920x1080@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 1600x1200@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 1680x1050@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 1680x1050@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 1600x1024@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 1400x1050@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 1280x1024@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 1440x900@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 1280x960@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 1360x768@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 1360x768@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 1152x864@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 1024x768@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 800x600@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 800x600@56Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 640x480@60Hz with output at 1920x1280@60Hz (pass 0)
CRTC 63: trying mode 2560x1700@60Hz with output at 1920x1280@60Hz (pass 1)
CRTC 63: trying mode 2048x1536@60Hz with output at 1920x1280@60Hz (pass 1)
CRTC 63: trying mode 1920x1440@60Hz with output at 1920x1280@60Hz (pass 1)
CRTC 63: trying mode 1856x1392@60Hz with output at 1920x1280@60Hz (pass 1)
CRTC 63: trying mode 1792x1344@60Hz with output at 1920x1280@60Hz (pass 1)
CRTC 63: trying mode 1920x1200@60Hz with output at 1920x1280@60Hz (pass 1)
CRTC 63: trying mode 1920x1080@60Hz with output at 1920x1280@60Hz (pass 1)


I solved this error from this steps.


type cvt 1920 1280 60


sudo vim /usr/share/X11/xorg.conf.d/10-monitor.conf



Section "Monitor"
  Identifier "Monitor0"
  Modeline "1920x1280_60.00"  206.25  1920 2056 2256 2592  1280 1283 1293 1327 -hsync +vsync
EndSection
Section "Screen"
  Identifier "Screen0"
  Device "eDP1"
  Monitor "Monitor0"
  DefaultDepth 24
  SubSection "Display"
    Depth 24
    Modes "1920x1280_60" "1280x960"
  EndSubSection
EndSection




2016년 2월 28일 일요일

How To – Change Hostname on Raspberrypi

How To – Change Hostname on Raspberrypi

To change the hostname
You need to edit 2 files replace raspberry with <name> this is what you choose and does not need <> brackets
1. Edit the hostname file
sudo nano /etc/hostname
raspberry
You will see raspberry change this to whatever you want (one word with  limited characters apply) <name>
CTRL+X press Y then hit Enter
2. Next you need to change the hosts file
sudo nano/etc/hosts
Change the entry 127.0.1.1 raspberry
To 127.0.1.1 <name>
Test with:
cat /etc/hosts
It should return the new name you gave it if not repeat the steps above
3. Reboot
When you login you will see pi@<name> ~ this is your new prompt
sudo reboot