"Linux"의 두 판 사이의 차이

ph
이동: 둘러보기, 검색
잔글 (→‎test)
1번째 줄: 1번째 줄:
==== 한글 나오게 하기 ====
+
=== 한글 나오게 하기 ===
  
 
<code>.bashrc</code>에 <code>export LANG=ko_KR.UTF-8</code>
 
<code>.bashrc</code>에 <code>export LANG=ko_KR.UTF-8</code>
11번째 줄: 11번째 줄:
  
  
==== gcc설치 ====
+
=== gcc설치 ===
 
<code>yum groupinstall 'Development Tools'</code>
 
<code>yum groupinstall 'Development Tools'</code>
  
  
  
====selinux====
+
===selinux===
 
* see /etc/sysconfig/iptables (if you cannot access port 80 at remote place)
 
* see /etc/sysconfig/iptables (if you cannot access port 80 at remote place)
 
*# Modify that file or  
 
*# Modify that file or  
29번째 줄: 29번째 줄:
  
  
====unix time conversion ====
+
===unix time conversion ===
 
<code># date -d @1187769064</code>
 
<code># date -d @1187769064</code>
  
  
  
====Base64 decode to file====  
+
===Base64 decode to file===  
 
<code>perl -MMIME::Base64 -ne 'print decode_base64($_)' < file.txt > out</code>
 
<code>perl -MMIME::Base64 -ne 'print decode_base64($_)' < file.txt > out</code>
 
<br>([http://wvarner.blogspot.com/2008/06/base64-decode-to-file.html FROM])
 
<br>([http://wvarner.blogspot.com/2008/06/base64-decode-to-file.html FROM])
40번째 줄: 40번째 줄:
  
  
====core file====
+
===core file===
 
<code>cat /proc/sys/kernel/core_pattern</code><br>
 
<code>cat /proc/sys/kernel/core_pattern</code><br>
 
[https://superuser.com/questions/849099/where-does-ubuntu-14-04-drop-core-files superuser.com]
 
[https://superuser.com/questions/849099/where-does-ubuntu-14-04-drop-core-files superuser.com]
46번째 줄: 46번째 줄:
  
  
====gateway ip====
+
===gateway ip===
 
<pre> $ route -n
 
<pre> $ route -n
 
  $ netstat -r -n
 
  $ netstat -r -n
55번째 줄: 55번째 줄:
  
  
====<code>ip route</code> examples====
+
===<code>ip route</code> examples===
 
<pre> ip route add 192.168.1.0/24 dev eth0
 
<pre> ip route add 192.168.1.0/24 dev eth0
 
  ip route add default via 192.168.1.254
 
  ip route add default via 192.168.1.254
63번째 줄: 63번째 줄:
  
  
====ip collision detect : <code>arp-scan</code>====
+
===ip collision detect : <code>arp-scan</code>===
 
<pre>$ sudo apt-get install arp-scan
 
<pre>$ sudo apt-get install arp-scan
 
$ arp-scan -I eth0 -l | grep 192.168.1.42
 
$ arp-scan -I eth0 -l | grep 192.168.1.42
72번째 줄: 72번째 줄:
  
  
====ssh alias====
+
===ssh alias===
 
edit <code>~/.ssh/config</code>
 
edit <code>~/.ssh/config</code>
 
<pre>Host myremote            # any name for the host
 
<pre>Host myremote            # any name for the host
84번째 줄: 84번째 줄:
  
  
====test====
+
===kill x-server (stop lightdm)===
{{pre|def quickSort(arr):
+
ctrl + alt + F1 : to switch terminal.
less = []
+
cf) ctrl+alt+F7 to switch x-window
pivotList = []
+
<pre>sudo service lightdm stop</pre>
more = []
+
or
if len(arr) <= 1:
+
<pre>sudo /etc/init.d/lightdm stop
return arr
+
# or
else:
+
sudo service lightdm stop
pass
+
# lightdm can be known by this.
}}
+
cat /etc/X11/default-display-manager</pre>
{{pre| test}}
+
[http://askubuntu.com/a/320670 askubuntu.com] [http://askubuntu.com/a/295786 askubuntu.com][http://askubuntu.com/a/1222 askubuntu.com]
 +
 
 +
 
 +
 
 +
===“Required key not available” when install 3rd party kernel modules===
 +
or after a kernel upgrade.<br>
 +
To resolve this, disable Secure Boot in UEFI(BIOS) settings.
 +
<br>[http://askubuntu.com/a/762255 askubuntu.com]
 +
 
 +
 
 +
 
 +
===my Ubuntu version===
 +
<pre>lsb_release -a</pre>
 +
[https://help.ubuntu.com/community/CheckingYourUbuntuVersion help.ubuntu.com]
 +
 
 +
 
 +
<disqus></disqus>

2017년 3월 30일 (목) 21:46 판

한글 나오게 하기

.bashrcexport LANG=ko_KR.UTF-8

X에 한글글꼴이 없을 수 있음. 그러면 윈도우에 글꼴 몇개 가져다가/usr/share/fonts/ms/에 넣고

# cd /usr/share/fonts/ms
# mkfontscale
# ttmkfdir
# fc-cache
# chmod -R a+r /usr/share/fonts/msfont

이렇게 하면 됨. 글꼴파일 이름이 한글이어도 정상동작했고 firefox에서 자동으로 인식했음. 터미널에는 글꼴 없어도 export LANG만 가지고도 됨.여기참고했음. 나는 fonts.dir, fonts.cache-1같은것이 생기지 않았기 때문에 저 중에 무언가를 빼도 될것같기도 함.


gcc설치

yum groupinstall 'Development Tools'


selinux

  • see /etc/sysconfig/iptables (if you cannot access port 80 at remote place)
    1. Modify that file or
    2. Use the system-config-firewall command
    3. if this is not a problem, see this CentOS wiki page
      • semanage port -a -t http_port_t -p tcp 81
  • Use setenforce command instead of echo 0 > /selinux/enforce (Because just simple. no other reasons)
  • ls -Z
  • ps -ZC httpd
    • or ps -eZ


unix time conversion

# date -d @1187769064


Base64 decode to file

perl -MMIME::Base64 -ne 'print decode_base64($_)' < file.txt > out
(FROM)


core file

cat /proc/sys/kernel/core_pattern
superuser.com


gateway ip

 $ route -n
 $ netstat -r -n
 $ ip route show 

gateway가 아예 안나올 때(via ~가 보이지 않는다거나 route에서 gateway가 *.*.*.*)가 있던데 이건 어떤 경우인지 모르겠다.
www.cyberciti.biz


ip route examples

 ip route add 192.168.1.0/24 dev eth0
 ip route add default via 192.168.1.254
 ip route delete 192.168.1.0/24 dev eth0

www.cyberciti.biz


ip collision detect : arp-scan

$ sudo apt-get install arp-scan
$ arp-scan -I eth0 -l | grep 192.168.1.42
 192.168.1.42 d4:eb:9a:f2:11:a1 (Unknown)
 192.168.1.42 f4:23:a4:38:b5:76 (Unknown) (DUP: 2)

askubuntu.com


ssh alias

edit ~/.ssh/config

Host myremote             # any name for the host
HostName 192.168.178.05   # IP, .local, or hostname if defined
User username             # your username
Port 22                   # port to listen

and then, ssh myremote
askubuntu.com


kill x-server (stop lightdm)

ctrl + alt + F1 : to switch terminal. cf) ctrl+alt+F7 to switch x-window

sudo service lightdm stop

or

sudo /etc/init.d/lightdm stop 
# or 
sudo service lightdm stop
# lightdm can be known by this.
cat /etc/X11/default-display-manager

askubuntu.com askubuntu.comaskubuntu.com


“Required key not available” when install 3rd party kernel modules

or after a kernel upgrade.
To resolve this, disable Secure Boot in UEFI(BIOS) settings.
askubuntu.com


my Ubuntu version

lsb_release -a

help.ubuntu.com


blog comments powered by Disqus