顯示具有 Ubuntu 標籤的文章。 顯示所有文章
顯示具有 Ubuntu 標籤的文章。 顯示所有文章

2013年5月5日 星期日

利用apt-get source來獲得ubuntu package sourcecode


apt-get source <package-name>  -d

# -d: only-download, 只下載,並不執行解壓縮。若沒有加上此選項的話,則會呼叫dpkg-source命令,而它會根據dsc檔案的敘述,將source解壓縮到相對應的目錄當中。


一共會下載三個形式的檔案,分別是:  .orign.tar.gz 、 debian.tar.gz (or diff.tar.gz) 以及 .dsc。



Reference

1. http://www.sigma.me/2012/12/01/ubuntu-compile-src-to-debian.html

2013年5月4日 星期六

在提示符號(prompt)上色



# ANSI color codes
RS="\[\033[0m\]"    # reset
HC="\[\033[1m\]"    # hicolor
UL="\[\033[4m\]"    # underline
INV="\[\033[7m\]"   # inverse background and foreground
FBLK="\[\033[30m\]" # foreground black
FRED="\[\033[31m\]" # foreground red
FGRN="\[\033[32m\]" # foreground green
FYEL="\[\033[33m\]" # foreground yellow
FBLE="\[\033[34m\]" # foreground blue
FMAG="\[\033[35m\]" # foreground magenta
FCYN="\[\033[36m\]" # foreground cyan
FWHT="\[\033[37m\]" # foreground white
BBLK="\[\033[40m\]" # background black
BRED="\[\033[41m\]" # background red
BGRN="\[\033[42m\]" # background green
BYEL="\[\033[43m\]" # background yellow
BBLE="\[\033[44m\]" # background blue
BMAG="\[\033[45m\]" # background magenta
BCYN="\[\033[46m\]" # background cyan
BWHT="\[\033[47m\]" # background white



https://help.ubuntu.com/community/CustomizingBashPrompt

2013年5月2日 星期四

OpenStack on Ubuntu 12.04 LTS安裝注意事項


Edit /etc/apt/sources.list.d/cloud-archive.list:

Folsom

deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/folsom main

Grizzly

deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/grizzly main

2013年4月14日 星期日

Ubuntu更改語系(中文->英文)



1. vim /var/lib/locales/supported.d/local
修改or新增放置在第一行
en_US.UTF-8 UTF-8

2.
vim /etc/default/locale
LANG="en_US.UTF-8"
LANGUAGE="en_US:en"

3. reboot


PS: 若有出現以下的錯誤訊息,則用
warning: setlocale: LC_CTYPE: cannot change locale


1. locale-gen en_US.UTF-8
2. update-locale LANG=en_US.UTF-8
3. reboot

來修正