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

参考:

https://wiki.archlinux.org/index.php/VirtualBox_%28%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87%29#.E4.BB.80.E4.B9.88.E6.98.AFVirtualBox

https://bbs.archlinux.org/viewtopic.php?id=95295

NO.18

安装视频/音频解码器

https://wiki.archlinux.org/index.php/Codecs_%28%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87%29

NO.19

想安装pps网络电视,先装totem-pps,发现不好使,总体是不是ppstream协议什么的,只要安装了ppstream (用yaourt安装)

NO.20

我现在使用的是gnome桌面环境,也是最精简的那种,发现没有音量控制器了。

pulseaudio-mixer-applet安装这个就好了

NO.21

安装的字体

#pacman -S ttf-arphic-ukai ttf-bitstream-vera ttf-arphic-uming wqy-zenhei wqy-bitmapfont

NO.22

压缩/解压 文件相关

#pacman -S rar zip unrar unzip p7zip file-roller

NO.23

刚装了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

NO.24

u盘安装archlinux, WIN系统下推荐使用ultraiso,LINUX系统下推荐unetbootin.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值