歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> archlinux的一些設置

archlinux的一些設置

日期:2017/3/1 14:56:18   编辑:關於Linux
archlinux的一些設置 NO.1 pppoe開機自動連接設置,編輯/etc/rc.local,在其中加入sudo pppoe-start 保存,退出。 NO.2 #pacman -S hal 編輯/etc/rc.conf 最後一行deemon中加入gdm //讓gdm在開機前啟動 編輯/etc/inittab: 注意前面這幾行 # Boot to console id:3:initdefault: # Boot to X11 #id:5:initdefault: 改為 # Boot to console #id:3:initdefault: # Boot to X11 id:5:initdefault: 然後,去文件末尾找到 #x:5:respawn:/usr/bin/xdm -nodaemon 改成 x:5:respawn:/usr/sbin/gdm -nodaemon 保存,退出。 NO.3 格式化U盤文件格式為fat,需安裝dosfstools,不然會提示mkfs.vfat: No such file or directory. No.4 archlinux安裝gnome3的文章 https://wiki.archlinux.org/index.php/Gnome_3 http://zazaq.com/2010/04/27/gnome-screen-gnome-3-0-on-arch/ (參考,未實際測試) NO.5 開啟testing源,編輯/etc/pacman.conf #[testing] ## Add your preferred servers here, they will be used first #Include = /etc/pacman.d/mirrorlist #[community-testing] ## Add your preferred servers here, they will be used first #Include = /etc/pacman.d/mirrorlist 更改成 [testing] ## Add your preferred servers here, they will be used first Include = /etc/pacman.d/mirrorlist [community-testing] ## Add your preferred servers here, they will be used first Include = /etc/pacman.d/mirrorlist 保存,退出。 sudo pacman -Syu 更新系統 (其實還有unstable源,不過文件裡面沒有,如現在的gnome-unstable源裡就是傳說中的gnome3,當然也就有kde-unstable源咯) NO.6 (備份) /etc/makepkg.conf #DLAGENTS=('ftp::/usr/bin/wget -c --passive-ftp -t 3 --waitretry=3 -O %o %u' 'http::/usr/bin/wget -c -t 3 --waitretry=3 -O %o %u' 'https::/usr/bin/wget -c -t 3 --waitretry=3 --no-check-certificate -O %o %u' 'rsync::/usr/bin/rsync -z %u %o' 'scp::/usr/bin/scp -C %u %o') NO.7 useradd -m -g users -G audio,lp,optical,storage,video,wheel,games,power-s /bin/bash flashgive 增加一個名為flashgive的賬戶,設置 bash 為登錄 shell,並將其添加進audio,lp,optical,storage,video,wheel,games,power這些組。 gpasswd -a flashgive audio 單獨添加flashgive到audio組 NO.8 # pacman -S hwdetect # hwdetect --modules 會得到類似MODULES=(ac battery button processor thermal video cdrom ....)的一串字符,復制它們 編輯/etc/rc.conf文件,找到其中的 MOD_AUTOLOAD="yes" #MOD_BLACKLIST=() #deprecated MODULES=() 改為 MOD_AUTOLOAD="no" #MOD_BLACKLIST=() #deprecated MODULES=(****那些紅色標記的字符****) 保存,退出。 文檔說這樣開機更快點。 PS:不過這個方法也有個弊端,一旦你使用了新的模塊,那麼你得再做一遍這個,不然會出問題。 來源:https://wiki.archlinux.org/index.php/Hwdetect NO.9 屏蔽IPV6模塊 IPv6模塊在啟動時加載。有許多程序在檢測到IPv6模塊存在後會加載它。實際上,它們是在加載ipv6的別名 ── net-pf-10。將下面的內容加入到/etc/modprobe.d/modprobe.conf中可以屏蔽ipv6的自動加載,但仍讓你可以在需要的時候可以手工加載。 # disable autoload of ipv6 alias net-pf-10 off NO.10 開啟shell自動完成功能! 安裝bash-completion: #pacman -S bash-completion 在~/.bashrc中加入下面的內容: if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi 然後運行: $source ~/.bashrc NO.11 一些重要文件的描述 ~/.xinitrc - 控制啟動時X11要加載哪些程序;最後一行必須是你要使用的窗口管理器,並且以exec來執行。 /etc/profile - 系統profile文件;加載環境配置(內核必須支持profiling) /etc/rc.conf - 主配置文件,有點象DOS下的config.sys。 /etc/rc.sysinit - 有點象autoexec.bat文件,負責處理加載和設置系統 /etc/rc.single - 單用戶系統級的腳本文件 /etc/rc.multi - 多用戶系統級的腳本文件 /etc/rc.local - 本地多用戶系統級的腳本文件 /etc/rc.shutdown - 關機系統級的腳本文件 /etc/rc.d/* -系統的守護進程腳本所在目錄 /etc/conf.d/* - 系統的守護進程配置文件所在目錄 解壓各種類型文件 file.tar : tar xvf file.tar file.tgz : tar xvzf file.tgz file.tar.gz : tar xvzf file.tar.gz file.bz : bzip -cd file.bz | tar xvf - file.bz2 : tar xvjf file.tar.bz2ORbzip2 -cd file.bz2 | tar xvf - file.zip : unzip file.zip file.rar : unrar x file.rar NO.12 省時的命令行別名 你可以在~/.bashrc或/etc/profile裡創建自己的命令行別名。兩者都可以用來定義你自己的別名 我選擇編輯~/.bashrc,添加了三行 alias p="sudo pacman" alias y="yaourt" alias g="sudo gedit" 示例: #alias ls="ls --color=auto" not necessary in Arch Linux alias p="pacman" #timesaving!! alias p="yaourt" #even more timesaving :)) alias ll="ls -lh" alias la="ls -a" alias exit="clear; exit" alias x="startx" alias pacsearch="pacman -Sl | cut -d' ' -f2 | grep " #lets you search through all available packages simply using 'pacsearch packagename' alias pacup="sudo pacman -Syu" # sudo pacman -Syu by typing pacup (sudo must be installed and configured first ;) ) alias pac="sudo pacman -S"# sudo pacman -S by typing pac (sudo must be installed and configured first ;) ) NO.13 使用aria2加速 #pacman -S aria2 編輯/etc/makepkg.conf (編譯軟件時) 默認使用wget,改成aria2: DLAGENTS=('ftp::/usr/bin/aria2c -s5 %u -o %o' 'http::/usr/bin/aria2c -s5 %u -o %o' 'https::/usr/bin/aria2c -s5 %u -o %o' 'rsync::/usr/bin/rsync -z %u %o' 'scp::/usr/bin/scp -C %u %o') (-s5 ---五個線程) 參考:https://wiki.archlinux.org/index.php/Improve_Pacman_Performance NO.14 使用小企鵝輸入法fcitx-4 #yaourt -S fcitx (默認不帶配置工具,需另裝fcitx-configtool) 編輯 ~/.bashrc添加以下代碼 #setup XIM environment, needn't if use SCIM as gtk-immodules export GTK_IM_MODULE=xim export QT_IM_MODULE=xim export XMODIFIERS="@im=fcitx" 保存,退出。注銷當前賬戶,重新登錄。 Alt + F2 運行fcitx & (該字符是shilft + 7) 命令 ,查看fcitx 是否正常運行。 參考:https://wiki.archlinux.org/index.php/Fcitx NO.15 $grep _drv.so /var/log/Xorg.0.log 查看X用了哪些驅動 NO.16 在/etc/fstab中加入這麼一段話 none /tmp tmpfs defaults 0 0 在/etc/rc.local當中 sudo chmod 777 /tmp NO.17 virtualbox #sudo pacman -S virtualbox_bin qt mesa #sudo gpasswd -a 用戶名 vboxusers #sudo modprobe vboxdrv ===> You must reload vboxdrv module before starting VirtualBox: ===> # modprobe vboxdrv ===> ===> You must reload vboxnetflt for Host Interface Networking: ===> # modprobe vboxnetflt ===> ===> You must reload vboxnetadp for Host-Only networking: ===> # modprobe vboxnetadp ===> ===> To load it automatically, add vboxdrv module ===> to the MODULES array in /etc/rc.conf. 嗯,遇到了錯誤,無法打開virtualbox [cmennens@ghost virtualbox_bin]$ VirtualBox VirtualBox: supR3HardenedMainGetTrustedMain: dlopen("/opt/VirtualBox/VirtualBox.so",) failed: libSDL-1.2.so.0: cannot open shared object file: No such file or directory 解決辦法: #pacman -S sdl 想安裝pps網絡電視,先裝totem-pps,發現不好使,總體是不是ppstream協議什麼的,只要安裝了ppstream (用yaourt安裝) 我現在使用的是gnome桌面環境,也是最精簡的那種,發現沒有音量控制器了。 pulseaudio-mixer-applet安裝這個就好了 安裝的字體 #pacman -S ttf-arphic-ukai ttf-bitstream-vera ttf-arphic-uming wqy-zenhei wqy-bitmapfont 壓縮/解壓 文件相關 #pacman -S rar zip unrar unzip p7zip file-roller 剛裝了flashget (知道我為啥叫flashgive嗎,哈哈),因為是archlinux x86_64 系統,所以,無法運行呢,可把我給折騰的啊。 先提示: flashget: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory 解決方法: #cd /usr/lib/ #sudo ln -s libexpat.so.1.5.2 libexpat.so #sudo ln -s libexpat.so libexpat.so.0 #cd /usr/lib32/ #sudo ln -s libexpat.so.1.5.2 libexpat.so #sudo ln -s libexpat.so libexpat.so.0 又有一個問題: libgtk-x11-2.0.so.0: wrong ELF class: ELFCLASS64 解決方法: #pacman -S lib32-gtk2 u盤安裝archlinux, WIN系統下推薦使用ultraiso,LINUX系統下推薦unetbootin.
Copyright © Linux教程網 All Rights Reserved