April 29, 2009
鼓勵此網誌:0
Ubuntu 9.04剛出就趕快去抓來裝裝看,首先就是感覺開機速度很快的說,再來就是套件真的很多好用。不過卻在剛安裝完後有一些設定要去加,才能讓比較進階的功能出來,以下就是我安裝的一些note:
1. 安裝VIM
這個最好用的編輯程式,Ubuntu竟然沒有預設安裝,不過只要透過套件管理程式安裝就好了,也不會太麻煩。
1.1 修改VIM設定
在安裝完VIM後,需要做一些微調,才能用起來更好用。就是修改/etc/vim/vimrc:
A. 加入搜尋字串的Highlight高亮度顯示
set hlsearch
B. 修改完即離開檔案後,下次在編輯時可以回到最後的位置
取消comment以下的部份
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
C. 顯示行號
set nu
D. 游標目前所在Highlight
set cursorline
2. 安裝SSH client & server
利用套件管理程式安裝即可。
3. 安裝TFTP server
利用套件管理程式安裝TFTP-hpa,之後再修改設定檔/etc/default/tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -c -s /tftpboot"
也修改/etc/inetd.conf
tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -c -s /tftpboot
參數:
-c 讓client可以修改server內的檔案
-s 指定server的資料夾
4. 安裝ckermit (超級終端機)
利用套件管理程式安裝ckermit,並加入以下內容到其設定檔/etc/kermit/kermrc
set line /dev/ttyS0 ;設定com port的裝置
set speed 115200 ;設定baudrate
set carrier-watch off
set handshake none
set flow-control none ;流量控制
set terminal bytesize 8 ;資料位元
set stop-bit 1 ;停止位元
set parity none ;同位檢查
5. 修改.bashrc
5.1 取消comment
alias ll='ls -l'
alias la='ls -A'
5.2 讓提示字串prompt顯示顏色
force_color_prompt=yes
5.3 改變prompt的顏色
PS1='${debian_chroot:+(debian_chroot)}\[\033[01;30m\]\u@\h\[\033[00m\]:\[\033[00;34m\]\w\[033[00m\]\$ '
5.4 讓history裡沒有重複的指令
export HISTCONTROL=ignoredups
6. 如果有參照Mount SFTP path without password來設置無密碼的SSH登入,當用SSH登入時就會出現"Agent admitted failure to sign using the key"的錯誤,那就需要修改/etc/X11/Xsession.d/90x11-common_ssh-agent,加入SSH_AUTH_SOCK=0
相關連結:ssh Agent admitted failure to sign using the key on big endian machines
1. 安裝VIM
這個最好用的編輯程式,Ubuntu竟然沒有預設安裝,不過只要透過套件管理程式安裝就好了,也不會太麻煩。
1.1 修改VIM設定
在安裝完VIM後,需要做一些微調,才能用起來更好用。就是修改/etc/vim/vimrc:
A. 加入搜尋字串的Highlight高亮度顯示
set hlsearch
B. 修改完即離開檔案後,下次在編輯時可以回到最後的位置
取消comment以下的部份
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
C. 顯示行號
set nu
D. 游標目前所在Highlight
set cursorline
2. 安裝SSH client & server
利用套件管理程式安裝即可。
3. 安裝TFTP server
利用套件管理程式安裝TFTP-hpa,之後再修改設定檔/etc/default/tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -c -s /tftpboot"
也修改/etc/inetd.conf
tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -c -s /tftpboot
參數:
-c 讓client可以修改server內的檔案
-s 指定server的資料夾
4. 安裝ckermit (超級終端機)
利用套件管理程式安裝ckermit,並加入以下內容到其設定檔/etc/kermit/kermrc
set line /dev/ttyS0 ;設定com port的裝置
set speed 115200 ;設定baudrate
set carrier-watch off
set handshake none
set flow-control none ;流量控制
set terminal bytesize 8 ;資料位元
set stop-bit 1 ;停止位元
set parity none ;同位檢查
5. 修改.bashrc
5.1 取消comment
alias ll='ls -l'
alias la='ls -A'
5.2 讓提示字串prompt顯示顏色
force_color_prompt=yes
5.3 改變prompt的顏色
PS1='${debian_chroot:+(debian_chroot)}\[\033[01;30m\]\u@\h\[\033[00m\]:\[\033[00;34m\]\w\[033[00m\]\$ '
5.4 讓history裡沒有重複的指令
export HISTCONTROL=ignoredups
6. 如果有參照Mount SFTP path without password來設置無密碼的SSH登入,當用SSH登入時就會出現"Agent admitted failure to sign using the key"的錯誤,那就需要修改/etc/X11/Xsession.d/90x11-common_ssh-agent,加入SSH_AUTH_SOCK=0
相關連結:ssh Agent admitted failure to sign using the key on big endian machines



