主要版面

Yens's note

Debian


Created Tuesday 3/6/2014

重灌系統改為Debian,因此新增一些重灌之後需要安裝以及修改系統的筆記






*如何改 Command-Line Prompt 請看下面的terminal指令筆記




@terminal改顏色
$ vi ~/.bashrc
進入之後將force_color_prompt=yes將註解取消
儲存關閉

 
@改lilyterm的預設字型
再terminal裡按右鍵->系統預設值->就會顯示路徑/etc/xdg/lilyterm.conf
須進入到root修改
$ sudo su-
$ vi /etc/xdg/lilyterm.conf
找到font_name,筆者範例改為font_name = DejaVu Sans Mono 12
儲存關閉
按右鍵->使用者設定檔->勾選自動儲存設定

 
@安裝pure data
Debian 沒有add-apt-repository指令,因此跟pd官網步驟不太一樣

$ sudo apt-get install lsb-release
$ echo "deb http://apt.puredata.info/releases `lsb_release -c | awk '{print $2}'` main"
產生出 deb http://apt.puredata.info/releases wheezy main
將這段複製下來,貼在安裝的套件倉庫
$ sudo vi /etc/apt/sources.list
開啟後貼上,並標註
# pd-extend
deb http://apt.puredata.info/releases wheezy main
儲存關閉

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 9f0fe587374bbe81
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key D63D3D09C39F5EEB
$ sudo apt-get update
$ sudo apt-get install pd-extended

 
@安裝alsamixer
$ sudo apt-get install alsamixer無法找到,
改打 $ apt-cache search alsamixer
出現
alsa-utils - Utilities for configuring and using ALSA
libasound2-plugin-equal - equalizer plugin for ALSA
alsamixergui - graphical soundcard mixer for ALSA soundcard driver
cairo-dock-alsamixer-plug-in - Cairo-dock - Alsamixer plug-in
gmerlin - multiformat media player
gnome-alsamixer - ALSA sound mixer for GNOME
mudita24 - ALSA GUI control tool for Envy24 (ice1712) soundcards
qasconfig - ALSA configuration browser
qashctl - mixer for ALSA's High level Control Interface
qasmixer - ALSA mixer for the desktop
qastools-common - QasTools common files
第一個就是我要裝的

$ sudo apt-get install alsa-utils
 
@調整時區
$ sudo dpkg-reconfigure tzdata
進去之後調整到台北時區,調整完之後終端機顯示
Current default time zone: 'Asia/Taipei'
Local time is now: Wed Jun 4 22:19:35 CST 2014.
Universal Time is now: Wed Jun 4 14:19:35 UTC 2014.

 
@安裝flash
$ sudo apt-get install flashplugin-nonfree









========================================================================

Terminal指令筆記

Created Tuesday 13 May 2014

@看電量
acpi -b


@轉檔
convert Linux\ audio\ conference.pdf Linux\ audio\ conference.jpg


@自動關閉terminal
$ export TMOUT=5
五秒之後關閉終端機


@直接看現在位置
$ pwd


@ 列出之前打的歷史紀錄
$ ls -l
$ ls -la
$ ll

$ ls -la | more
$ ls -la /home | more
$ ls -la /home | less


@日曆表
$ cal -3
$ cal 5 2014


@看其他時區的時間
$ export TZ=Austria/Linz
$ date


@How to Change the Command-Line Prompt Colour in the Ubuntu/Linux Terminal
http://ubuntugenius.wordpress.com/2011/07/11/how-to-change-the-command-line-prompt-colour-in-2the-ubuntulinux-terminal/

$ PS1='${debian_chroot:+($debian_chroot)}\[\033[01;36m\]\u\[\033[01;31m\]@\[\033[01;36m\]\h\[\033[01;33m\]:\[\033[01;31m\]\w\[\033[01;33m\]ᛤ '

Black 0;30 – Dark Gray 1;30 – Blue 0;34 – Light Blue 1;34 – Green 0;32 – Light Green 1;32 – Cyan 0;36 – Light Cyan 1;36 – Red 0;31 – Light Red 1;31 – 1Purple 0;35 – Light Purple 1;35 – Brown 0;33 – Yellow 1;33 – Light Gray 0;37 – White 1;37


@bash設定檔
$vi .bashrc

if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
(在 這裡貼上指令)PS1='${debian_chroot:+($debian_chroot)}\[\033[01;34m\]\u \[\033[01;31m\]@\[\033[01;34m\]\h\[\033[01;37m\]:\[\033[01;36m\]\w\[\033[01;37m\]☺ '
unset color_prompt force_color_prompt

存檔跳出即可


@help
$ ls --help
$ man ls


@處理目錄指令
cd:變換目錄
pwd:顯示目前的目錄
mkdir:建立一個新的目錄
rmdir:刪除一個空的目錄


@back to root
$ cd /


@成立資料夾
$mkdir essayfold
$touch essay.txt

$ rm essay.txt
$ rm essayfold //刪除資料夾,若裡面有物件,就無法刪除
$ rm -rf essayfold //刪除資料夾以及裡面的文件

$ rm -rf / //千萬不可以執行這行!!!!!要不然全部刪除就死定了


@移動資料
$ mv essay1.text essays/essay1.txt


@改檔名
$mv essay1.txt essay1


@拷貝資料
$ cp essay1.text ../my-newname-essay1.txt


@用nano編輯文件
$nano ./essay1.txt
打開之露在裡面打hello everyone~
ctrl+X離開,願意案存檔按y
$cat essay1.txt
將會print出 hello everyone~


@surch file
$ locate essay1.txt
if you forget the name....
$locate *essay*


@看file的資訊
$file /home/yen/Documents/Linz interview .odt


@看指令
$ cd /bin
$ls


@usb連手機網路
手機要打開usb tethering
$sudo dhcliet -v usb0


@詳細的安裝與講解git
http://gogojimmy.net/2012/01/17/how-to-use-git-1-git-basic/
http://blog.sanc.idv.tw/2012/10/github-github.html


@投影
$ xrandr --output VGA-0 --auto

WoFOSS好自由小組(台灣女子自由軟體工作小組,Women in Free and Open Source Software in Taiwan), 是由一群參與自由軟體的女生組成的社群。資訊/工程領域,傳統一直由男性主導。然而多年來,女生們陸陸續續,從各個角度進入這個領域,不論是開發工程師、 推廣者,甚至只是喜歡自由軟體的使用者。我們希望集結資訊領域的女生,發出我們的聲音,以行動塑造對女性更友善的資訊環境。讓女生參與自由軟體,投入資訊 領域,都能覺得好自由,好自在!