사용자 도구

사이트 도구


ubuntu

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판이전 판
다음 판
이전 판
ubuntu [2019/02/18 13:07] – [부팅 usb] rex8312ubuntu [2025/03/26 02:37] (현재) rex8312
줄 1: 줄 1:
 ====== Ubuntu ====== ====== Ubuntu ======
  
 +===== 기본세팅 ======
 +
 +<code bash>
 +# miniforge3
 +curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
 +
 +# uv
 +curl -LsSf https://astral.sh/uv/install.sh | sh
 +
 +# rustup
 +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
 +
 +# gh
 +conda install gh -c conda-forge
 +</code>
 +
 +
 +
 +===== CUDA ======
 +
 +cuda 설치도중 에러
 +
 +  sudo apt-get -o Dpkg::Options::="--force-overwrite" install --fix-broken
 +
 +  * https://blog.argcv.com/articles/5813.c
 +===== 계정 추가 =====
 +
 +<code bash>
 +adduser {user}
 +sudo usermod -a -G sudo {user} # sudo 권한 부여 방법 1)
 +# sudo visudo  # sudo 권한 부여 방법 2), 사용자 추가하고 root와 동일하게 설정
 +</code>
 +
 +  * 참고
 +    * http://firstboos.tistory.com/entry/sudo-user-%EC%B6%94%EA%B0%80
 +    * http://south10.tistory.com/entry/%EC%9A%B0%EB%B6%84%ED%88%AC-%EC%9D%BC%EB%B0%98-%EC%82%AC%EC%9A%A9%EC%9E%90-sudo-%EA%B6%8C%ED%95%9C-%EC%A3%BC%EA%B8%B0
 +
 +===== SSH 설정 =====
 +
 +  * [[ssh#password_없이_로그인]]
 ===== 콘솔에서 GUI 프로그램 실행 ===== ===== 콘솔에서 GUI 프로그램 실행 =====
  
줄 44: 줄 84:
   sudo apt update && sudo apt upgrade   sudo apt update && sudo apt upgrade
      
-  +===== 명령 안에서 명령 결과 사용(inline 명령) ===== 
 + 
 +<code bash> 
 +$ echo `echo "hello world"
 +</code>
 ===== 화면 일부 확대 ===== ===== 화면 일부 확대 =====
  
줄 100: 줄 144:
  
   ~/.config/autostart 에 복사   ~/.config/autostart 에 복사
-   
- 
-==== 계정 추가 ==== 
- 
-  adduser {user} 
- 
-sudo 권한 부여 
- 
-  sudo visudo 
- 
-  * http://firstboos.tistory.com/entry/sudo-user-%EC%B6%94%EA%B0%80 
-  * http://south10.tistory.com/entry/%EC%9A%B0%EB%B6%84%ED%88%AC-%EC%9D%BC%EB%B0%98-%EC%82%AC%EC%9A%A9%EC%9E%90-sudo-%EA%B6%8C%ED%95%9C-%EC%A3%BC%EA%B8%B0 
- 
  
 ==== IP 설정 ==== ==== IP 설정 ====
줄 158: 줄 189:
  
   * https://rufus.ie/   * https://rufus.ie/
 +
 +
 +===== tar =====
 +
 +압축
 +
 +  tar -cvf --keep-directory-symlink {file}.tar {dir}
 +
 +해체
 +
 +  ?
 +  
 +===== 사용할 CPU core 지정 =====
 +
 +<code bash>
 +$ taskset -c 0 {명령어}  # 0번 cpu core 사용
 +
 +# -c 예제: 0,5,7,9-11
 +</code>
 +
 +  * http://coffeenix.net/board_view.php?bd_code=1702
 +
 +===== apt-get =====
 +
 +  * 방화벽 뒤에서 add-apt-repository 명령을 실행할 수 없을 때
 +    * https://gist.github.com/maciakl/4531580
 +
 +<code bash>
 +# 방화벽 뒤에서 접속 시도
 +ubuntu@sc-2-master:~$ sudo add-apt-repository ppa:greymd/tmux-xpanes
 + deb package for tmux-xpanes (https://github.com/greymd/tmux-xpanes).
 + More info: https://launchpad.net/~greymd/+archive/ubuntu/tmux-xpanes
 +Press [ENTER] to continue or ctrl-c to cancel adding it
 +
 +gpg: keyring `/tmp/tmpwn1du2ob/secring.gpg' created
 +gpg: keyring `/tmp/tmpwn1du2ob/pubring.gpg' created
 +gpg: requesting key 28C3BA9D from hkp server keyserver.ubuntu.com
 +Error: retrieving gpg key timed out.
 +^C
 +gpg: Interrupt caught ... exiting
 +Exception ignored in: <module 'threading' from '/usr/lib/python3.5/threading.py'>
 +Traceback (most recent call last):
 +  File "/usr/lib/python3.5/threading.py", line 1288, in _shutdown
 +    t.join()
 +  File "/usr/lib/python3.5/threading.py", line 1054, in join
 +    self._wait_for_tstate_lock()
 +  File "/usr/lib/python3.5/threading.py", line 1070, in _wait_for_tstate_lock
 +    elif lock.acquire(block, timeout):
 +KeyboardInterrupt
 +
 +# 실패후, 키(28C3BA9D)를 아래 명령으로 요청
 +ubuntu@sc-2-master:~$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 28C3BA9D
 +Executing: /tmp/tmp.JvNHe1znyd/gpg.1.sh --keyserver
 +hkp://keyserver.ubuntu.com:80
 +--recv-keys
 +28C3BA9D
 +gpg: requesting key 28C3BA9D from hkp server keyserver.ubuntu.com
 +gpg: key 28C3BA9D: public key "Launchpad PPA for greymd" imported
 +gpg: Total number processed: 1
 +gpg:               imported: 1  (RSA: 1)
 +</code>
 +
 +==== 패키지 설치 불가능 =====
 +
 +<code bash>
 +# error message
 +Preparing to unpack .../libglx-mesa0_19.2.8-0ubuntu0~18.04.2_amd64.deb ...
 +Unpacking libglx-mesa0:amd64 (19.2.8-0ubuntu0~18.04.2) over (19.2.8-0ubuntu0~18.04.1) ...
 +dpkg: error processing archive /var/cache/apt/archives/libglx-mesa0_19.2.8-0ubuntu0~18.04.2_amd64.deb (--unpack):
 + '/usr/lib/x86_64-linux-gnu/libGLX_indirect.so.0'의 덮어쓰기를 시도합니다. 이 파일은 nvidia-440 440.33.01-0ubuntu1 패키지에도 들어있습니다
 +처리하는데 오류가 발생했습니다:
 + /var/cache/apt/archives/libglx-mesa0_19.2.8-0ubuntu0~18.04.2_amd64.deb
 +E: Sub-process /usr/bin/dpkg returned an error code (1)
 +</code>
 +
 +<code bash>
 +sudo apt-get -o Dpkg::Options::="--force-overwrite" install --fix-broken
 +</code>
ubuntu.1550495238.txt.gz · 마지막으로 수정됨: 2024/03/23 02:37 (바깥 편집)