嗯..因為老師問我,怎麼把主機名稱"gauss"改成"Gauss"
傻了我@_@,因為我也不知道。
所以就查了一下,要怎麼改主機名稱
debain:
主機名稱是紀錄在
/etc/hostname
裡面,修改之後
/etc/init.d/hostname.sh start
登出再登入就會重新load hostname file了
不然就是重開機囉XP
flash player for 64bit linux
看來終於可以在linux 64bit上使用flash player
(也有可能是小弟之前愚笨不知道怎麼使用)
目前在阿多比的官網並沒有提供64bit的下載
可是到阿多比的lab 可以找到flash player Square
flashplayer10_square
下載下來吧!for linux 64bit
#tar zxvf flashplayer10_2_p3_64bit_linux_111710.tar.gz
#mv libflashplayer.so /usr/lib64/iceweasel/plugins
#chmod 755 libflashplayer.so
#chown user:user libflashplayer.so
然後重新啟動iceweasel
上youtube看看吧!ok了
另外補充一下
如果要換新版本的square
要手動刪掉/usr/lib64/iceweasel/plugins裡的libflashplayer.so
再重覆上面的動作。
(也有可能是小弟之前愚笨不知道怎麼使用)
目前在阿多比的官網並沒有提供64bit的下載
可是到阿多比的lab 可以找到flash player Square
flashplayer10_square
下載下來吧!for linux 64bit
#tar zxvf flashplayer10_2_p3_64bit_linux_111710.tar.gz
#mv libflashplayer.so /usr/lib64/iceweasel/plugins
#chmod 755 libflashplayer.so
#chown user:user libflashplayer.so
然後重新啟動iceweasel
上youtube看看吧!ok了
另外補充一下
如果要換新版本的square
要手動刪掉/usr/lib64/iceweasel/plugins裡的libflashplayer.so
再重覆上面的動作。
掛載隨身硬碟的好工作!
就是你了!還看!
ntfs-3g
當debain不會自動掛載隨身碟的時候…
就要靠它啦!
#apt-get install ntfs-3g
commond:
mount
ntfs-3g /dev/sda1 /mnt/windows
unmonut
umount /mnt/windows
剩下其他指令可以查看
http://linux.die.net/man/8/mount.ntfs-3g
最後給自已一個tip
-o locale=zh_TW.utf8 (繁中)
-o locale=zh_CH.utf8 (簡中)
如此一來,沒辦法顯示中文的問題就解決了
ntfs-3g /dev/hda1 /windows/C/ -o silent,umask=0,locale=zh_TW.utf8
ntfs-3g
當debain不會自動掛載隨身碟的時候…
就要靠它啦!
#apt-get install ntfs-3g
commond:
mount
ntfs-3g /dev/sda1 /mnt/windows
unmonut
umount /mnt/windows
剩下其他指令可以查看
http://linux.die.net/man/8/mount.ntfs-3g
最後給自已一個tip
-o locale=zh_TW.utf8 (繁中)
-o locale=zh_CH.utf8 (簡中)
如此一來,沒辦法顯示中文的問題就解決了
ntfs-3g /dev/hda1 /windows/C/ -o silent,umask=0,locale=zh_TW.utf8
讓我的"大"A6耳機有聲音
看來許多華碩A系列產品都有這個問題,耳機沒有聲音。
目前測試 debain505 i386
#atp-get install alsa-utils
把以下文字
options snd-hda-intel model=z71v position_fix=1
貼到:
/etc/modprobe.d/alsa-base
看論壇ubuntu要貼到
/etc/modprobe.d/sound
重新開機,搞定!
debian 6
貼到
/etc/modprobe.d/alsa-base
/etc/modprobe.d/alsa-base.conf
/etc/modprobe.d/sound
reboot
目前測試 debain505 i386
#atp-get install alsa-utils
把以下文字
options snd-hda-intel model=z71v position_fix=1
貼到:
/etc/modprobe.d/alsa-base
看論壇ubuntu要貼到
/etc/modprobe.d/sound
重新開機,搞定!
debian 6
貼到
/etc/modprobe.d/alsa-base
/etc/modprobe.d/alsa-base.conf
/etc/modprobe.d/sound
reboot
linux 常用的播放器
兩個好用的linux音樂播放器
Amarok
Exaile
兩個都非常不錯,而且apt就有了,方便又好用的東西
另外下面留給.......影音播放器>"< 目前還找不到比較好又方便的播放器 不過目前用的Mplayer,debain原有的播放器 想看rmvb可以參考以下網頁
以下內容取自 How to play rmvb in mplayer
This tutorial will take you step by step through installing all of the software necessary to play rmvb (RealMedia Variable Bitrate) files in Ubuntu Linux.
Though the steps and screenshots are specific to Ubuntu, they will likely be similar for other versions of Linux. With that said, be sure to read the MPlayer README file if you’re not using Ubuntu. Similar to some of the other tutorials on Simplehelp, this is almost certainly not the only way to play .rmvb files in Ubuntu, but it’s the easiest way I could find. If you know of a easier method, by all means please feel free to leave a comment.
Amarok
Exaile
兩個都非常不錯,而且apt就有了,方便又好用的東西
另外下面留給.......影音播放器>"< 目前還找不到比較好又方便的播放器 不過目前用的Mplayer,debain原有的播放器 想看rmvb可以參考以下網頁
以下內容取自 How to play rmvb in mplayer
This tutorial will take you step by step through installing all of the software necessary to play rmvb (RealMedia Variable Bitrate) files in Ubuntu Linux.
Though the steps and screenshots are specific to Ubuntu, they will likely be similar for other versions of Linux. With that said, be sure to read the MPlayer README file if you’re not using Ubuntu. Similar to some of the other tutorials on Simplehelp, this is almost certainly not the only way to play .rmvb files in Ubuntu, but it’s the easiest way I could find. If you know of a easier method, by all means please feel free to leave a comment.
- The first step in playing .rmvb files in Ubuntu is to use the Synaptic Package Manager to install MPlayer. When you mark MPlayer for installation, you’ll be prompted to install additional software packages (if they’re not already installed).
- After MPlayer has been installed, exit out of the Synaptic Package Manager and visit the MPlayer binary codec download page. Download the codec package for your platform (for example, if you’re using a 32bit Intel or AMD processor, download the Linux x86 package). Save the file to your desktop (or home folder). Once the download has completed, double-click that file. Select the folder to uncompress, and click the Extract button.
click to enlarge
- Choose a location to extract the files (your desktop is ideal) and again click Extract.
- Make sure the files extracted correctly. They’ll be in a folder titled essential-date.
- Open up a Terminal by selecting Applications -> Accessories -> Terminal.
- Enter the following commands (and your password when prompted):
cd Desktop
cd essential-date
sudo mkdir /usr/lib/codecs
sudo cp * /usr/lib/codecs - NOTE: you may need to install libstdc++5 to get .rmvb files to play. Even though it might not be necessary for you, it can’t hurt to install (the package isn’t very big). Run the command: sudo apt-get install libstdc++5 in a Terminal, or use Synaptic and search for libstdc++5. Thanks to everyone who commented (see comments below) for the tip.
- Launch MPLayer by selecting Applications -> Sound & Video -> MPlayer Movie Player. Right-click in the Mplayer – Video window and select Preferences from the menu.
- Select the Video tab and change the Available drivers: to x11 X11 (XImage/Shm).
- Select the Codecs & demuxer tab and change the Video codec family: to RealVideo decoder and the Audio codec family: to FFmpeg/libavcodec audio decoders. When you’re done, click OK and close down MPlayer.
- Locate one of your .rmvb files, right-click it and select Properties.
- Select the Open With tab and change whatever the default is to MPlayer Movie Player. Click Close.
- Double-click any of your .rmvb files and they should open up in MPlayer and start playing.
linux 掛載光碟
#apt-get install fuseiso
#mkdir DVDISO //創造任意一個資料夾
#fuseiso DVD.iso DVDISO //掛載到DVDISO
#cd DVDISO
#fusermount -u DVDISO //卸載
#mkdir DVDISO //創造任意一個資料夾
#fuseiso DVD.iso DVDISO //掛載到DVDISO
#cd DVDISO
#fusermount -u DVDISO //卸載
apt 常用指令
本文取自:http://plog.longwin.com.tw/my_note-unix/2005/05/01/use_apt
伺服器列表
/etc/apt/source.list
系統升級相關:
aptitude
=======
1.aptitude install套件名稱
單純安裝指定套件
其他的可以參考apt-get
=======
apt-get
=======
1.apt-get update
更新套件資訊,要升級之前,最好都先執行一次本指令和 Server 端的資訊同步一下
2.apt-get check
檢查你系統上套件的相依性狀況
3.apt-get dist-upgrade 和 apt-get upgrade
執行整個升級動作,建議用 apt-get dist-upgrade 比較好
4.apt-get install 套件名稱
安裝某一個套件及其相關的套件
5.apt-get remove 套件名稱 (含設定檔等完整移除: apt-get --purge remove 套件名稱)
移除某套件,和 rpm -e 功能一樣,同時還會幫您把相關的套件一併移除
6.apt-get source 套件名稱
抓回 source rpm
例: apt-get source --compile zhcon
抓回 source rpm 並編譯成 binary rpm
--compile 參數就如同 rpm -ba 一般
7.apt-get clean
刪除下載回來的檔案
=========
apt-cache
=========
1.apt-cache showpkg
顯示套件資訊
例: apt-cache showpkg zhcon
2.apt-cache stats
顯示相關的統計資訊
3.apt-cache dump
顥示 cache 中每個套件的簡短資訊
4.apt-cache unmet
檢查所有未符合相依性的相關資訊
5.apt-cache show
顯示套件資訊,同 rpm -qi 一般
6.apt-cache search
尋找檔案 例: apt-cache search zhcon
7.apt-cache depends
顯示套件的相依性 例: apt-cache depends zhcon
8.apt-cache pkgnames
尋找符合的套件名稱 例: $ apt-cache pkgnames openss
openssh-askpass
openssl096
openssl-perl
openssl095a
openssl-python
openssh-clients
openssl-devel
openssh-askpass-gnome
openssh
openssl
openssh-serve
==========
apt-config
==========
1.apt-config dump
顯示目前的設定狀態
參考
http://www.linux.org.tw/~candyz/APT-HOWTO_CLE.txt
http://www.debian.org/doc/manuals/apt-howto/
其它備註
------------------------------------------------------------------
apt-get install package --reinstall 重新安裝套件
apt-get -f install 修復安裝 "-f = --fix-missing"
apt-cache rdepends package 是查看該套件被哪些套件依賴
apt-get build-dep package 安裝相關的編譯環境
apt-get source package 下載該套件的原始碼
apt-get clean && apt-get autoclean 清理沒用的套件
apt-get check 檢查是否有損壞的相依性
------------------------------------------------------------------
aptitude
套件管理程式,不喜歡打上述指令可以用這個。
伺服器列表
/etc/apt/source.list
系統升級相關:
- apt-get upgrade => 軟體升級
- apt-get dist-upgrade => 系統升級
- 更多詳細可見: SoftwareUpgrading
aptitude
=======
1.aptitude install套件名稱
單純安裝指定套件
其他的可以參考apt-get
=======
apt-get
=======
1.apt-get update
更新套件資訊,要升級之前,最好都先執行一次本指令和 Server 端的資訊同步一下
2.apt-get check
檢查你系統上套件的相依性狀況
3.apt-get dist-upgrade 和 apt-get upgrade
執行整個升級動作,建議用 apt-get dist-upgrade 比較好
4.apt-get install 套件名稱
安裝某一個套件及其相關的套件
5.apt-get remove 套件名稱 (含設定檔等完整移除: apt-get --purge remove 套件名稱)
移除某套件,和 rpm -e 功能一樣,同時還會幫您把相關的套件一併移除
6.apt-get source 套件名稱
抓回 source rpm
例: apt-get source --compile zhcon
抓回 source rpm 並編譯成 binary rpm
--compile 參數就如同 rpm -ba 一般
7.apt-get clean
刪除下載回來的檔案
=========
apt-cache
=========
1.apt-cache showpkg
顯示套件資訊
例: apt-cache showpkg zhcon
2.apt-cache stats
顯示相關的統計資訊
3.apt-cache dump
顥示 cache 中每個套件的簡短資訊
4.apt-cache unmet
檢查所有未符合相依性的相關資訊
5.apt-cache show
顯示套件資訊,同 rpm -qi 一般
6.apt-cache search
尋找檔案 例: apt-cache search zhcon
7.apt-cache depends
顯示套件的相依性 例: apt-cache depends zhcon
8.apt-cache pkgnames
尋找符合的套件名稱 例: $ apt-cache pkgnames openss
openssh-askpass
openssl096
openssl-perl
openssl095a
openssl-python
openssh-clients
openssl-devel
openssh-askpass-gnome
openssh
openssl
openssh-serve
==========
apt-config
==========
1.apt-config dump
顯示目前的設定狀態
參考
http://www.linux.org.tw/~candyz/APT-HOWTO_CLE.txt
http://www.debian.org/doc/manuals/apt-howto/
其它備註
- 移除多餘套件(Library): apt-get remove --purge `deborphan`
------------------------------------------------------------------
apt-get install package --reinstall 重新安裝套件
apt-get -f install 修復安裝 "-f = --fix-missing"
apt-cache rdepends package 是查看該套件被哪些套件依賴
apt-get build-dep package 安裝相關的編譯環境
apt-get source package 下載該套件的原始碼
apt-get clean && apt-get autoclean 清理沒用的套件
apt-get check 檢查是否有損壞的相依性
------------------------------------------------------------------
aptitude
套件管理程式,不喜歡打上述指令可以用這個。
解決 /usr/bin/ld: cannot find -lxxx 問題
問題:
在linux環境編譯應用程式或lib的source code時常常會出現如下的錯誤訊息:
其命名規則是:lib+庫名(即xxx)+.so。
會發生這樣的原因有以下三種情形:
gcc命令祥解
解決方法:
(1)先判斷在/usr/lib 下的相對應的函式庫文件(.so) 的 symbolic link 是否正確
若不正確改成正確的連結目標即可解決問題。
(2)若不是 symbolic link 的問題引起,而是系統缺少相對應的lib安裝lib即可解決。
(3)如何安裝缺少的lib:
以上面三個錯誤訊息為例:
先搜尋相對應的LIB再進行安裝的作業如:
在進行輸入法gcin的 Source Code的編譯時出現以下的錯誤訊息:
lib(.so檔)的symbolic link 不正確
解決方法如下:
解法如下:
apt-get install libxtst-dev
內容取自:波哥的IT私房菜
在linux環境編譯應用程式或lib的source code時常常會出現如下的錯誤訊息:
Example:
- /usr/bin/ld: cannot find -lxxx
其中xxx即表示函式庫文件名稱,如上例的:libc.so。
- /usr/bin/ld: cannot find -lc
其命名規則是:lib+庫名(即xxx)+.so。
會發生這樣的原因有以下三種情形:
1 系統沒有安裝相對應的lib對於上述三種原因有一篇文章寫的很棒可參考這一篇文章的第4點:
2 相對應的lib版本不對
3 lib(.so檔)的symbolic link 不正確,沒有連結到正確的函式庫文件(.so)
gcc命令祥解
解決方法:
(1)先判斷在/usr/lib 下的相對應的函式庫文件(.so) 的 symbolic link 是否正確
若不正確改成正確的連結目標即可解決問題。
(2)若不是 symbolic link 的問題引起,而是系統缺少相對應的lib安裝lib即可解決。
(3)如何安裝缺少的lib:
以上面三個錯誤訊息為例:
錯誤1缺少libc的LIB以Ubuntu為例:
先搜尋相對應的LIB再進行安裝的作業如:
apt-cache search libc-dev實例:
在進行輸入法gcin的 Source Code的編譯時出現以下的錯誤訊息:
/usr/bin/ld: cannot find -lXtst經檢查後發現是:
lib(.so檔)的symbolic link 不正確
解決方法如下:
cd /usr/lib如果在/usr/lib的目錄下找不到 libXtst.so 檔,那麼就表示系統沒有安裝libXtst的函式庫。
ln -s libXtst.so.6 libXtst.so
解法如下:
apt-get install libxtst-dev
內容取自:波哥的IT私房菜
把i386.deb的套件安裝在amd64的PC上
本文取自:沙中's Blog
方法1:以Scratch1.4為例
方法2:以安裝realplayer 11為例
測試心得:無法成功在debian執行…
方法1:以Scratch1.4為例
- 下載scratch_1.4.0.debian.12_i386.deb 並複製到[家目錄]底下
- 到http://frozenfox.freehostia.com/cappy/ 下載getlibs-all.deb 後,快按2次安裝
- 將下載的檔案copy到家目錄下
- 貼上 sudo dpkg -i --force-all scratch_1.4.0.debian.12_i386.deb
方法2:以安裝realplayer 11為例
- 先安裝i386 lib
sudo apt-get install ia32-libs* 或套件庫裡輸入 "ia32-libs"
- 安裝deb
sudo dpkg --force-architecture -i 套件名
- ex: 安裝realplayer 11將檔案放到[家目錄]資料夾下
sudo dpkg --force-architecture -i RealPlayer11GOLD.deb
- sudo dpkg -P 套件名
- ex: 移除強制安裝的realplayer11
sudo dpkg -P realplay
測試心得:無法成功在debian執行…
debian dpkg 常用指令
常用 Dpkg 指令表:
注意:更多選項可通過 dpkg -h 查詢,有些指令需要超級用戶權限才能執行。
| 命令 | 作用 |
dpkg -i package.deb | 安裝包 |
dpkg -r package | 刪除包 |
dpkg -P package | 刪除包(包括配置文件) |
dpkg -L package | 列出與該包關聯的文件 |
dpkg -l package | 顯示該包的版本 |
dpkg –unpack package.deb | 解開 deb 包的內容 |
dpkg -S keyword | 搜索所屬的包內容 |
dpkg -l | 列出當前已安裝的包 |
dpkg -c package.deb | 列出 deb 包的內容 |
dpkg –configure package | 配置包 |
在 Debian 使用 alien 處理 RPM 套件:
alien 可處理 .deb、.rpm、.slp、.tgz 等檔案格式, 進行轉檔或安裝.
於 Debian 安裝非 Debian 套件時, 可使用 alien 進行安裝.
安裝 alien 套件: apt-get install alien
- 在 Debian 安裝 RPM 套件: alien -i quota-3.12-7.i386.rpm
- 製作成 deb 的套件格式: alien -d quota-3.12-7.i386.rpm
- 製作成 rpm 的套件格式: alien -r quota_3.12-6_i386.deb
備註:rpm vs dpkg
安裝
目的 rpm 用法 dpkg 用法 安裝指定套件 rpm -i pkgfile.rpm dpkg -i pkgfile.deb
查詢
目的 rpm 用法 dpkg 用法 顯示所有已安裝的套件名稱 rpm -qa dpkg -l (小寫 L) 顯示套件包含的所有檔案 rpm -ql pkgname (小寫 L) dpkg -L pkgname 顯示特定檔案所屬套件名稱 rpm -qf /path/to/file dpkg -S /path/to/file 查詢套件檔案資訊 rpm -qip pkgfile.rpm (顯示套件資訊)
rpm -qlp pkgfile.rpm (小寫 L, 顯示套件內所有檔案)dpkg -I pkgfile.deb (大寫 I )
dpkg -c pkgfile.deb顯示指定套件是否安裝 rpm -q pkgname (只顯示套件名稱)
rpm -qi pkgname (顯示套件資訊)dpkg -l pkgname (小寫 L, 只列出簡潔資訊)
dpkg -s pkgname (顯示詳細資訊)
dpkg -p pkgname (顯示詳細資訊)
移除
目的 rpm 用法 dpkg 用法 移除指定套件 rpm -e pkgname dpkg -r pkgname (會留下套件設定檔)
dpkg -P pkgname (完全移除)
安裝win32 codecs編碼器
文章取自:楊錦昌老師 - 圖解 Fedora Core 3 桌面調校
1.到「http://www.mplayerhq.hu/MPlayer/releases/codecs/」網站,
下載「all-20050412.tar.bz2」----有新版可以下載新版。
1.到「http://www.mplayerhq.hu/MPlayer/releases/codecs/」網站,
下載「all-20050412.tar.bz2」----有新版可以下載新版。
2.su -
#變成 root 身份
cd /home/帳號
#進到下載的資料夾
tar jxvf all-20050412.tar.bz2
#解壓縮
3.mv all-20050412 /usr/local/lib/codecs
#將解開的資料夾移到「/usr/local/lib」,且更名為「codecs」
ln -s /usr/local/lib/codecs /usr/lib/win32
#建立連結
Install Liu in Linux
*移除Scim(Debian/Linux預設安裝Scim)
#apt-get remove scim
*安裝Gcin (已經裝好可省略此步驟)
1. #apt-get install gcin im-switch
(安裝gcin和im-switch←可簡單地切換輸入法)
2. #im-switch -s gcin
(將gcin更改成預設輸入法)
3.重新登入
*安裝 嘸蝦米 輸入法
1. wget http://edt1023.sayya.org/misc/noseeing-6.tar.gz #下載嘸蝦米的 table
(自已Xuite也有上傳....)
2. mkdir tmp; cd tmp
3. tar zxvf noseeing-6.tar.gz
4. mv noseeing.gtab /usr/share/gcin/table/
5. Gcin圖示按右鍵設定內定輸入法, 即可使用(也可以順便將不會用到輸入法刪除)
*移除Scim(Debian/Linux預設安裝Scim)
#apt-get remove scim
*安裝Gcin (已經裝好可省略此步驟)
1. #apt-get install gcin im-switch
(安裝gcin和im-switch←可簡單地切換輸入法)
2. #im-switch -s gcin
(將gcin更改成預設輸入法)
3.重新登入
*安裝 嘸蝦米 輸入法
1. wget http://edt1023.sayya.org/misc/noseeing-6.tar.gz #下載嘸蝦米的 table
(自已Xuite也有上傳....)
2. mkdir tmp; cd tmp
3. tar zxvf noseeing-6.tar.gz
4. mv noseeing.gtab /usr/share/gcin/table/
5. Gcin圖示按右鍵設定內定輸入法, 即可使用(也可以順便將不會用到輸入法刪除)
訂閱:
意見 (Atom)