vi /etc/environment
sudo apt-get install nautilus-image-converter imagemagick
sudo cp /usr/share/xsessions/gnome-fallback.desktop /usr/share/xsessions/custom.desktop sudo vi /usr/share/xsessions/custom.desktop [Desktop Entry] Name=Webterror Session Comment=Custom ~/.xsession script Exec=/home/webterror/.xsession X-Ubuntu-Gettext-Domain=gdm
webterror@webterror:~$ cat /etc/fuse.conf # Set the maximum number of FUSE mounts allowed to non-root users. # The default is 1000. # #mount_max = 1000 # Allow non-root users to specify the 'allow_other' or 'allow_root' # mount options. # user_allow_other ===> 주석해제 webterror@webterror:~$ sudo chmod 755 /etc/fuse.conf webterror@webterror:~$ curlftpfs -o nonempty webterror:1234@192.168.0.150/public_html /home/webterror/Desktop/SERVER
sudo apt-get install apt-file sudo apt-file update 예) apt-file list libsvn-java
$ dpkg-query -L synergy
sudo gedit /etc/NetworkManager/NetworkManager.conf make "managed=true" sudo killall NetworkManager logout and login again
삼바 상태 확인
$ service smbd status
$ testparm
# netstat -tunap | grep smb
check which locales are supported :
less /usr/share/i18n/SUPPORTED
Add locale to list of generated
echo "ko_KR.EUC-KR EUC-KR" >> /var/lib/locales/supported.d/local echo "ko_KR.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local
Regenerate list (it will invoke locale-gen…)
sudo dpkg-reconfigure locales
https://help.ubuntu.com/community/Internet/ConnectionSharing
sudo ip addr add 192.168.0.1/24 dev eth0 sudo iptables -A FORWARD -s 192.168.0.0/24 -m conntrack --ctstate NEW -j ACCEPT sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT sudo iptables -t nat -F POSTROUTING sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
내부아이피 다시 공유하고 인터넷망만 WLAN으로 빠지게 하기
# 원래 eth0에 추가 아이피를 지정해 준다.
sudo ip addr add 192.168.0.2/24 dev eth0 sudo iptables -A FORWARD -s 192.168.0.0/24 -m conntrack --ctstate NEW -j ACCEPT sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT sudo iptables -t nat -F POSTROUTING sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
# 여기서 특정 아이피만 찍어서 마스커레이딩을 시킨다.
sudo iptables -t nat -A POSTROUTING -s 192.168.0.10 -o wlan0 -j MASQUERADE
mount -t cifs //IPADDRESS/SHARE /home/Desktop/IPADDRESS/SHARE -o username=username,password=password -o iocharset=euc-kr mount -t cifs //130.68.49.237/SAMPLE /home/Desktop/130.68.49.237/SAMPLE -o username=guest,password=guest -o iocharset=euc-kr
sudo /usr/sbin/sshd -d (conf파일 디버그 하기) # SSH 로그인 세션 확인 tail -f /var/log/auth.log sudo mkdir -p /home/ssh_guest/guest1/upload/ sudo adduser --home /home/ssh_guest/guest1 guest1 sudo chown root:root -R /home/ssh_guest sudo groupadd sftponly sudo usermod -a -G sftponly guest1 sudo chmod 777 /home/ssh_guest/guest1/upload/
sshd_config 파일에 마지막에 추가
Match Group sftponly ChrootDirectory /home/ssh_guest/%u ForceCommand internal-sftp PasswordAuthentication yes X11Forwarding no AllowTcpForwarding no
우분투 색상 바꾸기 (이클립스에서 Debug Inspect 창이 검정배경으로 나오는 경우)
sudo apt-get install gnome-color-chooser
$ mkntfs /dev/sdb1
sudo apt-get install nautilus-open-terminal nautilus -q && nautilus&
sudo update-alternatives --config java
For 12.04 and Below – unity –reset
For 12.10 – How do I reset my Unity configuration?
For 13.04+ – unity-tweak-tool –reset-unity
Remove Launcher Custom Icons – unity –reset-icons
Compiz Config Settings Manager
sudo apt-get install compizconfig-settings-manager sudo apt-get install compizconfig-settings-manager compiz-plugins compiz-plugins-extra
sudo apt-get install unity-tweak-tool
배포판 버전 업그레이드가 아닌 현시스템 전체 업그레이드
sudo apt-get upgrade
https://chrome.google.com/webstore/detail/custom-stylesheet-script/hojkciooaohipljgobfikbkjcehockld/details?hl=en-US
@@ 위의 Extensions를 설치해서 강제로 스타일 시트를 입힌다.
i {
font-style: normal;
}
# The loopback network interface auto lo iface lo inet loopback # The primary network interface auto em1 #iface em1 inet dhcp iface em1 inet static address 192.168.0.100 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.2 dns-nameservers 8.8.8.8 sudo dpkg-reconfigure resolvconf sudo vi /etc/resolv.conf
sudo apt-get remove --purge mysql-client mysql-server mysql-common mysql-server-core-5.5 mysql-client-core-5.5 sudo apt-get autoclean sudo rm -rf /var/lib/mysql sudo rm -rf /etc/mysql
post-removal script ERROR 문제 해결방법
dpkg (subprocess): unable to execute installed post-removal script: Exec format error
dpkg: error processing postgresql-client-common (–remove):
subprocess installed post-removal script returned error exit status 2
No apport report written because MaxReports is reached already Errors were encountered while processing:
postgresql-9.2
postgresql-client-9.2
postgresql-common
postgresql-client-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
dpkg info 에 있는 관련 파일들을 전부 삭제한다.
sudo rm -rf /var/lib/dpkg/info/mysql-*
@@ 이후에 다음과 같은에러가 나올수 있다.
webterror@webterror-netbook:~$ sudo apt-get install –reinstall mysql-client mysql-server
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 49 not upgraded.
Need to get 0 B/22.8 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database …
dpkg: warning: files list file for package `mysql-client-5.5′ missing, assuming package has no files currently installed.
dpkg: warning: files list file for package `mysql-server-core-5.5′ missing, assuming package has no files currently installed.
dpkg: warning: files list file for package `mysql-server-5.5′ missing, assuming package has no files currently installed.
dpkg: warning: files list file for package `mysql-common’ missing, assuming package has no files currently installed.
dpkg: warning: files list file for package `mysql-client-core-5.5′ missing, assuming package has no files currently installed.
@@ 해당 패키지 들을 전부 재설치하면 해결된다.
리눅스 Grub 날렸을 경우
Grub Customizer Portable
우분투 라이브 CD로 부팅 해서 위 파일을 받아 속성-권한-실행 허용 해주고
File -> install to MBR
askubuntu
1. 우분투 시디로 부팅
2. sudo fdisk -l 명령으로 linux 파티션을 찾는다. /dev/sda2
3. 파티션 마운트 sudo mount /dev/sda2 /mnt
4. sudo grub-install –boot-directory=/mnt/boot /dev/sda
cat /sys/class/power_supply/BAT0/capacity
The other way is under Settings-Displays, then turn Off the Sticky edges option.
1. Go to System Settings.
2. In System Settings click on Security & Privacy.
3. Then Files & Applications.
4.Click on Clear Usage Data.
$ mkdir /mnt/ubuntu $ sudo mount /dev/sda1 /mnt/ubuntu $ sudo mount --bind /dev /mnt/ubuntu/dev $ sudo mount --bind /dev/pts /mnt/ubuntu/dev/pts $ sudo mount --bind /proc /mnt/ubuntu/proc $ sudo mount --bind /sys /mnt/ubuntu/sys $ mkswap -f /dev/sda5 => 이렇게 해야 UUID가 생성된다. $ sudo chroot /mnt/ubuntu/ /bin/bash $ grub-install /dev/sda $ update-grub2
고스트로 이미지를 복원할때 에러 Incorrect span segment 가 난다면,
이미지를 USB로 옮겨서 복원해 보면 가능할수도 있다.
Secondly, generate a UUID
This is simple, the following command will output a UUID like below:
uuidgen
f0acce91-a416-474c-8a8c-43f3ed3768f9
Finally apply the new UUID to the partition
This is also another command, tune2fs, which will apply our new UUID to our device path:
sudo tune2fs /dev/sde5 -U f0acce91-a416-474c-8a8c-43f3ed3768f9
Done, now you can update your grub to include the correct UUID’s to reduce any risk of your system confusing the partitions.
sudo apt-get install poppler-utils
sudo vi /usr/share/X11/xkb/symbols/altwin // Meta is mapped to second level of Alt keys. partial modifier_keys xkb_symbols "meta_alt" { key <LALT> { [ Alt_L, Meta_L ] }; key <RALT> { type[Group1] = "TWO_LEVEL", //symbols[Group1] = [ Alt_R, Meta_R ] }; symbols[Group1] = [ Hangul ] }; modifier_map Mod1 { Alt_L, Alt_R, Meta_L, Meta_R }; // modifier_map Mod4 {}; };
임시파일 삭제
sudo rm -fv /var/lib/xkb/*
iBUS 강제로 설정 바꾸는 것 – 안해도 상관없음
# dconf-editor 설치
sudo apt-get install dconf-editor
# dconf 실행
dconf-editor
# org-> gnome -> desktop -> wm -> keybindings -> switch-input-source -> [‘Hangul’] 로 설정
1. 시작->실행->regedit
2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters로 이동
3. LayerDriver KOR 항목을 kbd101a.dll로 수정
4. OverrideKeyboardIdentifier는 PCAT_101AKEY로 수정
5. OverrideKeyboardSubtype 항목을 3으로 수정
nm-applet 네트워크 애플릿 사라졌을시에 대응 방법
user1@user1-900X3L:~$ nm-applet
user1@user1-900X3L:~$ ps aux | grep nm-applet
user1 3517 0.0 0.4 1146988 39032 ? Sl 7월31 0:30 nm-applet
user1 8244 0.0 0.0 23596 1008 pts/2 S+ 17:20 0:00 grep –color=auto nm-applet
user1@user1-900X3L:~$ kill -9 3517
user1@user1-900X3L:~$ ps aux | grep nm-applet
user1 8249 0.0 0.0 23596 944 pts/2 S+ 17:20 0:00 grep –color=auto nm-applet
user1@user1-900X3L:~$ nm-applet &
sudo update-alternatives --config x-terminal-emulator
여기에서 gnome-terminal 찾아서 선택해 주면 된다.
sudo bash -c 'echo 0 > /sys/devices/platform/samsung/leds/samsung\:\:kbd_backlight/brightness' sudo vi /etc/rc.local 아래 내용 추가 echo 0 > /sys/devices/platform/samsung/leds/samsung\:\:kbd_backlight/brightness
user1@webterror-desktop:~/Downloads$ sudo vi /usr/share/applications/spark.desktop
[Desktop Entry]
Name=Spark
Version=2.6.3
GenericName=Spark
X-GNOME-FullName=Spark
Comment=ignite realtime Spark IM client
Type=Application
Categories=Application;Utility;
Path=/home/user1/apps/Spark
Exec=/bin/bash Spark
Terminal=false
StartupNotify=true
Icon=/home/user1/apps/Spark/logo-spark.png
TargetEnvironment=Unity
@@ 이클립스 단축 아이콘 추가
user1@webterror-desktop:~$ sudo vi /usr/share/applications/eclipse.desktop
[Desktop Entry]
Name=Eclipse
GenericName=Eclipse
X-GNOME-FullName=Eclipse
Type=Application
Categories=Development
#Path=/home/user1/Desktop/eclipse/
Exec=/home/user1/Desktop/eclipse/eclipse
Terminal=false
StartupNotify=true
Icon=/home/user1/Desktop/eclipse/icon.xpm
TargetEnvironment=Unity
VirtualBox UUID동일한 VDI 바꿀때 먼저 UUID를 바꾸는 방법
# UUID 바꾸기
VBoxManage internalcommands sethduuid Windows7-Work-20151101.vdi
sudo apt-get install virtualbox-guest-x11
# Copy & Paste 안될때 VBoxTray와 VBoxService 프로세스를 죽이고 다음고 같이 두가지 모두 재실행 한다.
c:\Windows\System32>VBoxTray.exe
c:\Windows\System32>VBoxService.exe -f
VBoxService 5.0.4 r102546 (verbosity: 0) win.x86 (Sep 8 2015 08:05:05) release
log
00:00:00.000000 main Log opened 2016-01-15T02:23:55.650632800Z
00:00:00.046875 main OS Product: Windows 7
00:00:00.062500 main OS Release: 6.1.7601
00:00:00.062500 main Executable: c:\Windows\System32\VBoxService.exe
00:00:00.062500 main Process ID: 888
00:00:00.062500 main Package type: WINDOWS_32BITS_GENERIC
00:00:00.109375 main 5.0.4 r102546 started. Verbose level = 0
TOMBOY에서 아래와 같은 메세지 에러가 났을 경우
“Error connecting :(
An error ocurred while connecting to the specified server:
fuse: mountpoint isnot empty
fuse: if you are sure this is safe use the ‘nonempty’ mount option”
[해결] 아래의 lock파일을 삭제한다.
rm .cache/tomboy/sync-sshfs/lock
클라이언트에서 ssh-keygen으로 키를 만들어준다.
user1@user1-VirtualBox:~$ ssh-keygen
키를 서버에 복사한다.
user1@user1-VirtualBox:~$ ssh-copy-id -i .ssh/macbookair.pub webterror@webterror.net
서버에 접속해서 패스워드를 묻지 않는다면 해결이 된것.!
user1@user1-VirtualBox:~$ ssh webterror@webterror.net