ubuntu
문서의 이전 판입니다!
목차
Ubuntu
콘솔에서 GUI 프로그램 실행
{executable} &
File descriminator 개수 변경
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
화면 일부 확대
(compiz 설치 후)
- CCSM –> 접근성 –> Enhanced Zoom Desktop
- Zoom in Button선택 –> Super + Button4(마우스 휠 위로)
- Zoom out Button선택 –> Super + Button5(마우스 휠 아래로)
노트북 무선랜/블루투스 활성화
# 무선랜/블루투스 활성화 여부 확인 sudo rfkill list # 활성화 sudo rfkill unblock all
프로그램 백그라운드에서 실행
Hostname 변경
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
문제해결
pyclean, pycompile: not found
sudo apt-get -m --reinstall install python python-minimal dh-python sudo apt-get -f install
데스트톱 시작 프로그램
~/.config/autostart 에 복사
계정 추가
adduser {user}
sudo 권한 부여
sudo visudo
IP 설정
/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
lightdm 재설정
dpkg-reconfigure lightdm
Memory 속도 측정
mbw {array size}
Windows 공유폴더 마운트
- 쓰기권한이 없을 때
- mount error(112): Host is down
부팅 usb
tar
압축
tar -cvf --keep-directory-symlink {file}.tar {dir}
해체
?
사용할 CPU core 지정
$ taskset -c 0 {명령어} # 0번 cpu core 사용 # -c 예제: 0,5,7,9-11
ubuntu.1550669839.txt.gz · 마지막으로 수정됨: 2024/03/23 02:37 (바깥 편집)