본문 바로가기

프로그래밍 기술 노트/Linux | WSL

(10)
[GWSL] WSL 에서 GUI 프로그램을 쉽게 사용하자 WSL2 에서 GUI 공식 지원해주기전까지는 이방법이 제일 쉽고 간편한듯하다. 보통 x서버 설치 -> wsl bashrc (또는 zshrc) 에 export 등록하고 사용하는데 이건 한번에 해주고, 뭔가 있어보이게 띄워준다. -> 최근에는 바로 안된다 ㅡㅡ... 그냥 곧있으면 공식(WSLg)으로 나오니까 기다리거나 preview를 쓰자 www.microsoft.com/ko-kr/p/gwsl/9nl6kd1h33v3?activetab=pivot:overviewtab GWSL 구매 - Microsoft Store ko-KR GWSL - The Feature-Packed, Highly-Integrated Windows 10 XServer www.microsoft.com opticos.github.io/gwsl/..
[Googler] 터미널에서 구글검색을 하자 github.com/jarun/googler jarun/googler :mag: Google from the terminal. Contribute to jarun/googler development by creating an account on GitHub. github.com 말 그대로 터미널에서 구글검색을 하게 해주는 프로그램 우분투 16 에서는 apt 로 설치가 안되므로 (구버전이 깔리며, wsl에서만 그런지는 모르겟으나 검색도 안됨) github.com/jarun/googler/releases/tag/v4.3.1 요기서 맞는버전을 다운받고 설치하면 된다. dpkg 로 설치하면 사용가능하다. --count 는 띄울개수 (안하면 기본 10개인듯) -x 는 검색할때 오타수정 사용안함. 이제 우분투 명령..
[Linux] 모니터링을 위한 watch 명령어 기초적인 명령어인데 최근까지 몰랏다... watch -h Usage: watch [options] command Options: -b, --beep beep if command has a non-zero exit -c, --color interpret ANSI color and style sequences -d, --differences[=] highlight changes between updates -e, --errexit exit if command has a non-zero exit -g, --chgexit exit when output from command changes -n, --interval seconds to wait between updates -p, --precise attempt ..
git 추적중지 https://stackoverflow.com/questions/17195861/undo-git-update-index-assume-unchanged-file Undo git update-index --assume-unchanged The way you Git ignore watching/tracking a particular dir/file. you just run this: git update-index --assume-unchanged Now how do you undo it so they are watched again? (Let's call i... stackoverflow.com git에서 ignore 에 지금 추가하기는 싫은데 변경사항 목록에 안떴으면 하는경우 특정파일에 대한 추적을 중지하고..
su 와 su - 의 차이 이것때문에 헛고생했다;; 리눅스에서 유저변경을 위하여 su (substitute user) 를 사용하는데 로그아웃하지않고 해당 유저 권한을 얻게된다. 이때 환경변수는 기존 유저의 환경변수를 그대로 따르기 때문에 유저별로 환경변수가 차이가 있는경우 --login (-l) 옵션 을 주어야한다. 이때 -l 도 쓸필요 없이 그냥 - (마이너스 기호) 만 붙여줘도 똑같이 작동한다. su user1 (기존 환경변수) su - user1 (user1의 환경변수)
라즈베리파이 AP 로 만들기 인터넷은 필요없는데 원격(ssh) 으로 라즈베리파이를 관리 및 확인해야될 일이 생겨 PAN 을 이용해서 할려고 했더니 네트워크실 연구실 친구가 AP로 만드는게 더 편할것이라고 하여 그쪽으로 노선을 변경 hostap로 AP 설정, isc-dhcp-server 로 dhcp ip 할당 (dhcp를 하지 않으면 대역에 맞는 IP 로 고정IP 설정 해야한다) $sudo apt-get install hostapd $sudo /etc/network/interfaces allow-hotplug wlan0 iface wlan0 inet static address 192.168.3.1 netmask 255.255.255.0 network 192.168.3.0 broadcast 10.10.5.255 gateway 192.1..
리눅스 SSH 접속 closed 되는 현상 리눅스 에서 ssh 가 안될때 1. 로그 확인 :라즈베리파이 우분투 마테 기준 /var/log/auth.log 확인. 2. Could not load host key: /etc/ssh/ssh_host_rsa_key ... 과 같이 key가 없는 경우 나오는 에러 : ssh-keygen -f /etc/ssh/ssh_host_rsa_key -t rsa -N "" 처럼 없는 key를 생성해준다. 2-1: sudo ssh-keygen -A하면 자동 생성 2-2 : 수동생성 ex) rsa,ecdsa,ed25519 키가 없으면 다음 명령어. sudo ssh-keygen -f /etc/ssh/ssh_host_rsa_key -t rsa -N "" sudo ssh-keygen -f /etc/ssh/ssh_host_ecd..
Ubuntu Docker 실행 관련 명령어 메모 Docker demon start # sudo service docker start Docker container 조회 모든 컨테이너 # docker ps -a 실행중인 컨테이너 # docker ps 컨테이너 중지/시작 재시작 # docker stop {ContainerName} # docker start {ContainerName} # docker restart {ContainerName} Docker container 접속 # docker exec -if {ContainerName} /bin/bash