# 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
cuda 설치도중 에러
sudo apt-get -o Dpkg::Options::="--force-overwrite" install --fix-broken
adduser {user} sudo usermod -a -G sudo {user} # sudo 권한 부여 방법 1) # sudo visudo # sudo 권한 부여 방법 2), 사용자 추가하고 root와 동일하게 설정
{executable} &
multiprocessing, queue를 사용할 때, 너무 많은 파일이 열려있다는 메시지가 나오는 경우 이것을 증가시키면 해결가능
ulimit -n # 현재 동시에 열 수 있는 파일의 개수 ulimit -n {n_fd} # n_fd로 동시에 열 수 있는 파일의 개수를 설정 ulimit -n 65536
현재 열려있는 파일 개수 확인
def get_open_fds(): import subprocess import os pid = os.getpid() procs = subprocess.check_output(["lsof", '-w', '-Ff', "-p", str(pid)]) procs = procs.decode('utf-8') nprocs = sum([1 for s in procs.split('\n') if s and s[0] == 'f' and s[1:].isdigit()]) return nprocs
gnome-desktop-item-edit ~/.local/share/applications/ --create-new
sudo apt-get install indicator-multiload
명령어들을 &&로 연결하면 앞의 명령이 성공하면 뒤의 명령을 실행한다. ||로 연결하면 앞의 명령이 실패했을 때 뒤의 명령을 실행한다.
sudo apt update && sudo apt upgrade
$ echo `echo "hello world"`
(compiz 설치 후)
# 무선랜/블루투스 활성화 여부 확인 sudo rfkill list # 활성화 sudo rfkill unblock all
hostnamectl set-hostname 'new-hostname'
또는
/etc/hosts와 /etc/hostname 에서 이름 변경 후 sudo service hostname restart
http://askubuntu.com/questions/9540/how-do-i-change-the-computer-name
sudo apt-get -m --reinstall install python python-minimal dh-python sudo apt-get -f install
~/.config/autostart 에 복사
/etc/network/interfaces 수정
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto enp0s25 #iface enp0s25 inet dhcp iface enp0s25 inet static address 192.168.0.105 netmask 255.255.255.0 gateway 192.168.0.1 dns-nameservers 210.220.163.82 210.107.239.131 211.47.128.1 8.8.8.8 8.8.4.4
dpkg-reconfigure lightdm
mbw {array size}
압축
tar -cvf --keep-directory-symlink {file}.tar {dir}
해체
?
$ taskset -c 0 {명령어} # 0번 cpu core 사용 # -c 예제: 0,5,7,9-11
# 방화벽 뒤에서 접속 시도 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)
# 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)
sudo apt-get -o Dpkg::Options::="--force-overwrite" install --fix-broken