1. Run .bin file

chmod +x file.bin
./file.bin


2. PATH

To add directory /data/myscripts to the beginning of the $PATH  environment variable, use the following:
PATH=/data/myscripts:$PATH

To add that directory to the end of the path, use the following command:
PATH=$PATH:/data/myscripts
 
Put this into .bashrc
if [ -d "$HOME/Programs/sage4.4" ] ; then
  PATH="$PATH:$HOME/Programs/sage4.4"
fi

3. maple classical worksheet
 
maple -cw

4. GRUB setting http://ubuntuforums.org/showthread.php?t=1195275

sudo su
gedit /etc/default/grub  -> Edit the file
update-grub -> to update grub.cfg

  • GRUB_DEFAULT - Sets the default menu entry. Entries may be numeric or "saved"
    • GRUB_DEFAULT=0 - Sets the default menu entry by menu position. As Grub Legacy, the first "menuentry" in grub.cfg is 0, the second is 1, etc.
    • GRUB_DEFAULT=saved - (Grub 1.98) Enables the "grub-reboot" and "grub-set-default" commands.
      • This setting allows the use of the following commands to set a default OS. The default OS will not be set merely by an interactive selection of an OS from the menu.
      • grub-set-default. Sets the default boot entry until changed.
        • The format is "sudo grub-set-default X, with X being the menuentry position (starting with 0 as the first entry) or the exact menu string. Examples: sudo grub-set-default 3 or sudo grub-set-default "Ubuntu, Linux 2.6.32-15-generic"
        • To obtain the existing menuentry choice number (starting from 0) or the menuentry "string", run "grep menuentry /boot/grub/grub.cfg"
      • grub-reboot. This command sets the default boot entry for the next boot only. The format of the command is the same as for "grub-set-default" (see above).
      • For an example of how to enable the "saved" option with a custom menu, see the "Custom User Entries" section.
    • GRUB_DEFAULT="xxxx" - An exact menu entry, including the quotation symbols, may also be used. In this case, location in the menu will not matter. Example: GRUB_DEFAULT="Ubuntu, Linux 2.6.31-9-generic"
  • GRUB_SAVEDEFAULT=true * If set to true this setting will automatically set the last selected OS from the menu as the default OS on the next boot. No commands need be run to set the default OS. For this entry to work, the GRUB_DEFAULT entry should be set tosaved.

5. Fix LCD brightness adjuct for ASUS 1005PE

# Find the line GRUB_CMDLINE_LINUX_DEFAULT and add "acpi_osi=Linux acpi_backlight=vendor", so it looks like this
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux acpi_backlight=vendor"

6. File system configuration (automount NTFS partition)

sudo su
gedit /etc/fstab

7. 한글 EUC-KR 추가

1) language-pack-ko 설치 (이미 설치되어 있을 경우 생략)
apt-get install language-pack-ko

2) locale-gen ko_KR.EUC-KR
sudo locale-gen ko_KR.EUC-KR

3) dpkg-reconfigure locales
dpkg-reconfigure locales

4) /etc/default/locale 수정
LANG="ko_KR.UTF-8"
LANG="ko_KR.EUC-KR"
LANGUAGE="ko_KR:ko:en_GB:en"

8. 인코딩 바꾸기 (EUC-KR => UTF-8)

#!/bin/bash
iconv -c -f euc-kr -t utf-8 $1 > $1.tmp && mv $1.tmp $1
위 내용을 ~/bin/euc2utf8.sh로 저장하시고 실행권한을 주신 후,

cd /path/to/targets/
for I in ./*.htm ; do ~/bin/euc2utf8.sh $I ; done

아니면 그냥

cd /path/to/targets/
for I in ./*.htm ; do iconv -c -f euc-kr -t utf-8 $I > $I.tmp && mv $I.tmp $I ; done

9. Evolution 에서 SMTP 서버 포트 설정 방법

주소란에 " smtp.gmail.com:587 " 이런 식으로 입력하면 된다.

10. MAC address 바꾸기

sudo ifconfig wlan0 down
sudo ifconfig wlan0 hw ether 11:22:33:44:55:66
sudo ifconfig wlan0 up

또는 다음 스크립트를 통해 랜덤하게 바꿀 수 있음:

================================
#!/bin/bash --
#
# Random MAC adress changer
# http://www.360percents.com
#
#

if [ "$UID" -eq "0" ]
then
    oldmac=`ifconfig -a | grep HWaddr | grep wlan0 | awk '{print $NF}'`
    echo "Old mac adress: $oldmac"
    newmac=`echo $RANDOM$RANDOM | md5sum | sed -r 's/(..)/\1:/g; s/^(.{17}).*$/\1/;'`
    sudo ifconfig wlan0 down
    sudo /etc/init.d/networking stop > /dev/null
    sudo ifconfig wlan0 hw ether $newmac
    sudo /etc/init.d/networking start > /dev/null
    sudo ifconfig wlan0 up
    echo "New mac adress: $newmac"
else
  echo "You need to be root to run this script. run: sudo $0"
fi
================================

11. SSH 설정

sudo gedit /etc/ssh/sshd_config

12. Sage Notebook 서버 열기

sage
notebook(interface='', secure=True)
(might have to run notebook.setup() to reset the hostname first.)

ref: http://www.sagemath.org/doc/reference/sagenb/notebook/notebook_object.html

13. Set Primary Monitor

Run "xrandr" to identify the name of the primary monitor, say DFP5. Then run the following script.

xrandr --output DFP5 --primary

14. Sending the current foreground job to the background using CTRL-Z and bg command

1) Press ‘CTRL+Z’ which will suspend the current foreground job.
2) Execute 'bg' to make that command to execute in background.

ssh USERNAME@DESTINATION -o "ProxyCommand=nc -X connect -x PROXY_SERVER:PROXY_PORT %h %p"

16. Important Shorcuts

( http://www.unixguide.net/linux/linuxshortcuts.shtml )

<Ctrl><Alt><F1>
Switch to the first text terminal. Under Linux you can have several (6 in standard setup) terminals opened at the same time.

<Ctrl><Alt><Fn> (n=1..6)
Switch to the nth text terminal.

tty
Print the name of the terminal in which you are typing this command.

<Ctrl><Alt><F7>
Switch to the first GUI terminal (if X-windows is running on this terminal).

 <Ctrl><Alt><Fn> (n=7..12)
Switch to the nth GUI terminal (if a GUI terminal is running on screen n-1). On default, nothing is running on terminals
8 to 12, but you can run another server there.

 <Tab>
(In a text terminal) Autocomplete the command  if there is only one option, or else show all the available options.
THIS SHORTCUT IS GREAT! It even works at LILO prompt!

 <ArrowUp>
Scroll and edit the command history. Press <Enter> to execute.

 <Shift><PgUp>
Scroll terminal output up. Work also at the login prompt, so you can scroll through your bootup messages.

 <Shift><PgDown>
Scroll terminal output down.

 <Ctrl><Alt><+>
(in X-windows) Change to the next X-server resolution (if you set up the X-server to more than one resolution). For multiple resolutions on my standard SVGA card/monitor, I have the following line in the file /etc/X11/XF86Config (the first resolution starts on default, the largest determines the size of the "virtual screen"):
Modes "1024x768" "800x600" "640x480" "512x384" "480x300" "400x300" "1152x864"

<Ctrl><Alt><->
(in X-windows) Change to the previous X-server resolution.

<Ctrl><Alt><BkSpc>
(in X-windows) Kill the current X-windows server. Use if the X-windows server crushes and cannot be exited normally.

<Ctrl><Alt><Del>
Shut down the system and reboot. This is the normal shutdown command for a user at the text-mode console. Don't just press the "reset" button for shutdown!

<Ctrl>c
Kill the current process (mostly in the text mode for small applications).

<Ctrl>d
Log out from the current terminal.  See also the next command.

<Ctrl>d
Send [End-of-File] to the current process. Don't press it twice else you also log out (see the previous command).

<Ctrl>s
Stop the transfer to the terminal.

<Ctrl>q
Resume the transfer to the terminal. Try if your terminal mysteriously stops responding.

<Ctrl>z
Send the current process to the background.

exit
Logout. I can also use logout for the same effect.  (If you have started a second shell, e.g., using bash the second shell will be exited and you will be back in the first shell, not logged out.)

reset
Restore a screwed-up terminal (a terminal showing funny characters) to default setting. Use if you tried to "cat" a binary file. You may not be able to see the command as you type it.

<MiddleMouseButton>
Paste the text which is currently highlighted somewhere else. This is the normal "copy-paste" operation in Linux.  (It doesn't work with Netscape and WordPerfect which use the MS Windows-style "copy-paste". It does work in the text terminal if you enabled "gpm" service using "setup".) Best used with a Linux-ready 3-button mouse (Logitech or similar) or else set "3-mouse button emulation").

~
(tilde) My home directory (normally the directory /home/my_login_name). For example, the command cd ~/my_dir will change my working  directory to the subdirectory "my_dir" under my home directory.  Typing just "cd" alone is an equivalent of the command "cd ~".

.
(dot) Current directory. For example, ./my_program will attempt to execute the file "my_program" located in your current working directory.

..
(two dots) Directory parent to the current one. For example, the command cd .. will change my current working directory one one level up.

댓글 0

목록
번호 제목 글쓴이 날짜 조회 수
공지 [정보] Noteworthy Composer(NWC) 사용법 & 팁 Taedong Yun 2012.05.07 116220
공지 [정보] 이메일 설정 Taedong Yun 2011.07.09 46722
» [정보] 중요 리눅스 커맨드 (계속 업데이트) Taedong Yun 2010.05.01 96511
공지 [자료] 시외버스 & 5005번 시간표 Taedong Yun 2005.03.11 60837
공지 [자료] Token Taedong Yun 2005.03.24 55787
공지 이름 대신 뜨는 이미지박스 신청 요령~ Taedong Yun 2004.02.25 55498
공지 - 의문사항 노트 Taedong Yun 2007.09.21 62851
공지 - 관심이 가는 책들 Taedong Yun 2005.01.15 54728
154 [자료] 대전지역 라디오 주파수 윤태동 2005.04.11 6972
153 [기사] Fresh News May Weaken the Dollar 윤태동 2005.04.12 7377
152 [정보] phpBB 사용법 & 웹사이트 윤태동 2005.04.12 17794
151 [자료] APMO 2005 file 윤태동 2005.04.13 8207
150 [자료] Authors of the IMO Problems 윤태동 2005.04.13 28200
149 [자료] IMO problems and solutions from 1959-2003 윤태동 2005.04.13 6378
148 [자료] 문근영 댄서의 순정 Teaser [2] 윤태동 2005.04.15 6169
147 [기사] 美천재 대학생, 한국패널들과 진지한 화상토론 윤태동 2005.04.23 8142
146 [정보] 최고의 영화 1000 윤태동 2005.04.23 28150
145 [영상] Without You - 머라이어 캐리 [2] 윤태동 2005.04.24 6059
144 [펌] 결혼 적령기 계산법 [3] 윤태동 2005.05.09 6231
143 [강연] 수학과 콜로퀴엄 참석할 것들 윤태동 2005.05.11 6329
142 [정보] 충남대 축제 초대가수 윤태동 2005.05.13 6649
141 [정보] 웹페이지에서 "소스 보기"를 클릭해도 메모장이 뜨지 않는 경우 해결책 [1] 윤태동 2005.05.17 6325
140 [정보] 테니스 라켓 선택에 관한 일반적 상식1 윤태동 2005.05.17 6205
139 [정보] 테니스 라켓 선택에 관한 일반적 상식2 윤태동 2005.05.17 14655
138 [정보] 테니스 라켓 선택에 관한 일반적 상식3 윤태동 2005.05.17 6751
137 [자료] 텍스트를 줄별로 섞어주는 CGI [1] 윤태동 2005.05.17 7145
136 [정보] 수학과 5인조 대학생 아카펠라그룹 윤태동 2005.05.19 6715
135 [정보] 익스플로러에서 파일 다운로드 한 번에 여러개 윤태동 2005.05.21 6139