包的源kdenetwork-kppp-4.3.0-1-i686.pkg.tar.gz
代码: 全选
Server = http://mirror.umoss.org/archlinux/$repo/os/i686/
包的源kdenetwork-kppp-4.3.0-1-i686.pkg.tar.gz
代码: 全选
Server = http://mirror.umoss.org/archlinux/$repo/os/i686/
locale.gen去掉这几行注释#
# /etc/rc.conf - Main Configuration for Arch Linux
#
# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
#LOCALE="en_US.utf8"
LOCALE="zh_CN.utf8"
#HARDWARECLOCK="local"
HARDWARECLOCK="localtime"
USEDIRECTISA="no"
TIMEZONE="Asia/Shanghai"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"
# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(vboxdrv)
#vboxdrv装VirtualBox后增加
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"
# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="myhost"
lo="lo 127.0.0.1"
# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
# - prefix an entry in INTERFACES with a ! to disable it
# - no hyphens in your interface names - Bash doesn't like it
#
# DHCP: Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
eth0="dhcp"
INTERFACES=(lo eth0)
#INTERFACES=(eth0)
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
# - prefix an entry in ROUTES with a ! to disable it
#
#gateway="default gw 192.168.0.1"
#ROUTES=(!gateway)
# Enable these network profiles at boot-up. These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
# - set to 'menu' to present a menu during boot-up (dialog package required)
# - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(main)
# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
# - prefix a daemon with a ! to disable it
# - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng ufw network netfs crond hal alsa gdm)
#hal alsa ufw gdm安装后增加
2、在/etc/pacman.conf中增加源,用于安装powerpill和yaourt#zh_CN.GB18030 GB18030
#zh_CN.GBK GBK
#zh_CN.UTF-8 UTF-8
#zh_CN GB2312
代码: 全选
[xyne-any]
Server = http://xyne.archlinux.ca/repos/any/
代码: 全选
[archlinuxfr]
Server = http://repo.archlinux.fr/i686
代码: 全选
pacman -Sy pacman
代码: 全选
rm /usr/bin/{view,rview}
代码: 全选
pacman -Syu
代码: 全选
pacman -S powerpill
代码: 全选
powerpill -S yaourt
代码: 全选
PacmanBin /usr/bin/powerpill
代码: 全选
yaourt -S sudo xorg gnome gnome-extra alsa-utils alsa-oss shaman nvidia scim-pinyin wqy-zenhei firefox firefox-i18n virtualbox_bin libdca nautilus-open-terminal flashplugin gufw mplayer mplayer-plugin pidgin openoffice-zh-CN networkmanager network-manager-applet wine wine_gecko clamav gthumb inkscape cabextract ntp p7zip unrar rar lm_sensors sensors-applet gvim conky w3m mldonkey gprename bridge-utils rpmextract fortune-mod ccache distcc netstat-nat gparted gstreamer0.10-ffmpeg gstreamer0.10-ugly-plugins gstreamer0.10-bad-plugins !glipper mpd gmpc jre !qbittorrent !amule dosfstools ntfs-3g synce-libsynce synce-odccm synce-librapi
代码: 全选
vi /etc/rc.conf
DAEMONS处增加iptables hal alsa gdmMODULES=(vboxdrv)
9、修改inittab(现在已经不用修改了,在DAEMONS加gdm就行了)DAEMONS=(syslog-ng iptables network netfs crond hal alsa gdm)
代码: 全选
vi /etc/inittab
注释掉3那行启用5那行或把3改成5id:5:initdefault:
代码: 全选
useradd -m -s /bin/bash 用户名
passwd 用户名
代码: 全选
visudo
代码: 全选
nano /etc/sudoers
代码: 全选
cat /etc/group
代码: 全选
gpasswd -a 用户名 组名
13、如果想重新启动服务(可以不重启电脑),可以在/etc/rc.d里面找到服务名称storage disk hal audio
所有文件拷贝到/usr/lib/win32目录下(新建win32目录)
all-20071007.tar.bz2解压后,把里面的内容全部剪切到/usr/lib/win32目录下,用mplayer就可以播放了
vi/vim 基本使用方法
本文介绍了vi (vim)的基本使用方法,但对于普通用户来说基本上够了!i/vim的区别简单点来说,它们都是多模式编辑器,不同的是vim 是vi的升级版本,它不仅兼容vi的所有指令,而且还有一些新的特性在里面。例如语法加亮,可视化操作不仅可以在终端运行,也可以运行于x window、 mac os、 windows。
vi编辑器是所有Unix及Linux系统下标准的编辑器,它的强大不逊色于任何最新的文本编辑器,这里只是简单地介绍一下它的用法和一小部分指令。由于对Unix及 Linux系统的任何版本,vi编辑器是完全相同的,因此您可以在其他任何介绍vi的地方进一步了解它。Vi也是Linux中最基本的文本编辑器,学会它后,您将在Linux的世界里畅行无阻。
[简单地,可以使用上下左右方向箭头和delete,backspace键来进行位置移动和删除,不管是命令模式还是插入模式]
1、vi的基本概念
基本上vi可以分为三种状态,分别是命令模式(command mode)、插入模式(Insert mode)和底行模式(last line mode),各模式的功能区分如下:
1) 命令行模式command mode)
控制屏幕光标的移动,字符、字或行的删除,移动复制某区段及进入Insert mode下,或者到 last line mode。
2) 插入模式(Insert mode)
只有在Insert mode下,才可以做文字输入,按「ESC」键可回到命令行模式。
3) 底行模式(last line mode)
将文件保存或退出vi,也可以设置编辑环境,如寻找字符串、列出行号……等。
不过一般我们在使用时把vi简化成两个模式,就是将底行模式(last line mode)也算入命令行模式command mode)。
2、vi的基本操作
a) 进入vi
在系统提示符号输入vi及文件名称后,就进入vi全屏幕编辑画面:$ vi myfile。不过有一点要特别注意,就是您进入vi之后,是处于「命令行模式(command mode)」,您要切换到「插入模式(Insert mode)」才能够输入文字。初次使用vi的人都会想先用上下左右键移动光标,结果电脑一直哔哔叫,把自己气个半死,所以进入vi后,先不要乱动,转换到「插入模式(Insert mode)」再说吧!
b) 切换至插入模式(Insert mode)编辑文件
在「命令行模式(command mode)」下按一下字母「i」就可以进入「插入模式(Insert mode)」,这时候你就可以开始输入文字了。
c) Insert 的切换
您目前处于「插入模式(Insert mode)」,您就只能一直输入文字,如果您发现输错了字!想用光标键往回移动,将该字删除,就要先按一下「ESC」键转到「命令行模式(command mode)」再删除文字。
d) 退出vi及保存文件
在「命令行模式(command mode)」下,按一下「:」冒号键进入「Last line mode」,例如:
: w filename (输入 「w filename」将文章以指定的文件名filename保存)
: wq (输入「wq」,存盘并退出vi)
: q! (输入q!, 不存盘强制退出vi)
3、命令行模式(command mode)功能键
1). 插入模式
按「i」切换进入插入模式「insert mode」,按“i”进入插入模式后是从光标当前位置开始输入文件;
按「a」进入插入模式后,是从目前光标所在位置的下一个位置开始输入文字;
按「o」进入插入模式后,是插入新的一行,从行首开始输入文字。
2). 从插入模式切换为命令行模式
按「ESC」键。
3). 移动光标
vi可以直接用键盘上的光标来上下左右移动,但正规的vi是用小写英文字母「h」、「j」、「k」、「l」,分别控制光标左、下、上、右移一格。
按「ctrl」+「b」:屏幕往“后”移动一页。
按「ctrl」+「f」:屏幕往“前”移动一页。
按「ctrl」+「u」:屏幕往“后”移动半页。
按「ctrl」+「d」:屏幕往“前”移动半页。
按数字「0」:移到文章的开头。
按「G」:移动到文章的最后。
按「$」:移动到光标所在行的“行尾”。
按「^」:移动到光标所在行的“行首”
按「w」:光标跳到下个字的开头
按「e」:光标跳到下个字的字尾
按「b」:光标回到上个字的开头
按「#l」:光标移到该行的第#个位置,如:5l,56l。
4). 删除文字
「x」:每按一次,删除光标所在位置的“后面”一个字符。
「#x」:例如,「6x」表示删除光标所在位置的“后面”6个字符。
「X」:大写的X,每按一次,删除光标所在位置的“前面”一个字符。
「#X」:例如,「20X」表示删除光标所在位置的“前面”20个字符。
「dd」:删除光标所在行。
「#dd」:从光标所在行开始删除#行
5). 复制
「yw」:将光标所在之处到字尾的字符复制到缓冲区中。
「#yw」:复制#个字到缓冲区
「yy」:复制光标所在行到缓冲区。
「#yy」:例如,「6yy」表示拷贝从光标所在的该行“往下数”6行文字。
「p」:将缓冲区内的字符贴到光标所在位置。注意:所有与“y”有关的复制命令都必须与“p”配合才能完成复制与粘贴功能。
6). 替换
「r」:替换光标所在处的字符。
「R」:替换光标所到之处的字符,直到按下「ESC」键为止。
7). 回复上一次操作
「u」:如果您误执行一个命令,可以马上按下「u」,回到上一个操作。按多次“u”可以执行多次回复。
8). 更改
「cw」:更改光标所在处的字到字尾处
「c#w」:例如,「c3w」表示更改3个字
9). 跳至指定的行
「ctrl」+「g」列出光标所在行的行号。
「#G」:例如,「15G」,表示移动光标至文章的第15行行首。
4、Last line mode下命令简介
在使用「last line mode」之前,请记住先按「ESC」键确定您已经处于「command mode」下后,再按「:」冒号即可进入「last line mode」。
A) 列出行号
「set nu」:输入「set nu」后,会在文件中的每一行前面列出行号。
B) 跳到文件中的某一行
「#」:「#」号表示一个数字,在冒号后输入一个数字,再按回车键就会跳到该行了,如输入数字15,再回车,就会跳到文章的第15行。
C) 查找字符
「/关键字」:先按「/」键,再输入您想寻找的字符,如果第一次找的关键字不是您想要的,可以一直按「n」会往后寻找到您要的关键字为止。
「?关键字」:先按「?」键,再输入您想寻找的字符,如果第一次找的关键字不是您想要的,可以一直按「n」会往前寻找到您要的关键字为止。
D) 保存文件
「w」:在冒号输入字母「w」就可以将文件保存起来。
E) 离开vi
「q」:按「q」就是退出,如果无法离开vi,可以在「q」后跟一个「!」强制离开vi。
「qw」:一般建议离开时,搭配「w」一起使用,这样在退出的时候还可以保存文件。
5、vi命令列表
1、下表列出命令模式下的一些键的功能:
h左移光标一个字符
l右移光标一个字符
k光标上移一行
j光标下移一行
^光标移动至行首
0数字“0”,光标移至文章的开头
G光标移至文章的最后
$光标移动至行尾
Ctrl+f向前翻屏
Ctrl+b向后翻屏
Ctrl+d向前翻半屏
Ctrl+u向后翻半屏
i在光标位置前插入字符
a在光标所在位置的后一个字符开始增加
o插入新的一行,从行首开始输入
ESC从输入状态退至命令状态
x删除光标后面的字符
#x删除光标后的#个字符
X(大写X),删除光标前面的字符
#X删除光标前面的#个字符
dd删除光标所在的行
#dd删除从光标所在行数的#行
yw复制光标所在位置的一个字
#yw复制光标所在位置的#个字
yy复制光标所在位置的一行
#yy复制从光标所在行数的#行
p粘贴
u取消操作
cw更改光标所在位置的一个字
#cw更改光标所在位置的#个字
2、下表列出行命令模式下的一些指令
w filename储存正在编辑的文件为filename
wq filename储存正在编辑的文件为filename,并退出vi
q!放弃所有修改,退出vi
set nu显示行号
/或?查找,在/后输入要查找的内容
n与/或?一起使用,如果查找的内容不是想要找的关键字,按n或向后(与/联用)或向前(与?联用)继续查找,直到找到为止。
完!
感谢,Thanks!
作者:iTech
出处:http://itech.cnblogs.com/
转载:本文版权归作者iTech所有,转载请注明出处,不得用于商业用途!
代码: 全选
sudo /etc/rc.d/ntpdate restart
在archlinux下的rc.conf里设置绑定多个IP的方法
lo="lo 127.0.0.1"
eth0="eth0 192.168.18.123 netmask 255.255.255.0 broadcast 192.168.18.255"
eth00="eth0:0 192.168.2.123 netmask 255.255.255.0 broadcast 192.168.2.255"
INTERFACES=(lo eth0 eth00)
gateway="default gw 192.168.18.1"
ROUTES=(gateway)
代码: 全选
MODULES=(powernow-k8 cpufreq_powersave)
DAEMONS=(…… @cpufreq)
代码: 全选
编辑/etc/conf.d/cpufreq,设置你需要的模式
# valid governors:
# ondemand, performance, powersave, conservative, userspace
governor="ondemand"
# valid freq suffixes: Hz, kHz (default), MHz, GHz, THz
min_freq="1GHz"
max_freq="2GHz"
代码: 全选
sudo sensors-detect
代码: 全选
DAEMONS=(syslog-ng crond ... sensors ...)
代码: 全选
sudo /etc/rc.d/sensors start
代码: 全选
sensors
解决自动挂载VFAT乱码问题
配置编辑器(gconf-editor)system->storage-default_options->vfat->mount_options->添加->utf8
代码: 全选
/opt/VirtualBox/kchmviewer
使用方法:
1.把代码写入文件比如 :iso_mount
2 赋予执行权限: chmod +x iso_mount
3 鼠标移动到iso 镜像文件上
单击右键->使用其它程序打开(A)->使用自定义命令(U)->浏览...
找到刚才写的iso_mount
4如果是用gnome的话,也可以放在~/.gnome2/nautilus-scripts/下面,就可以通过右键->脚本-> iso_mount来使用了。
代码: 全选
#! /bin/bash
if [ ! -z "$1" ]; then
NAUTILUS_SCRIPT_SELECTED_FILE_PATHS=$1
fi
isopath=$(echo "${NAUTILUS_SCRIPT_SELECTED_FILE_PATHS}" | sed 's/ /\\ /g ; s/(/\\(/g ; s/)/\\)/g ; s/&/\\&/ ; s/;/\\;/')
test="readlink -f $isopath "
isopath=`eval $test`
isofilename=$(echo "${isopath}" | sed 's/^\/.*\///')
rm /tmp/samenamefilepath
rm /tmp/filepath
rm /tmp/mounterror
rm /tmp/mountedlist.txt
rm /tmp/mountpointlist
rm /tmp/delerror.txt
echo -e '\r' | sudo losetup -a
if [ $? -eq 1 ]
then
mima=$(zenity --title="请输入密码" --hide-text ---entry --text=由于加载光盘需要root权限,请输入root密码)
echo $mima | sudo -S losetup -a
fi
if [ $? -eq 1 ]
then
mima=$(zenity --title="请输入密码" --hide-text --entry --text=不要挑战我的耐心,密码还是错误,请重新输入ROOT密码)
echo $mima | sudo -S losetup -a
fi
if [ $? -eq 1 ]
then
mima=$(zenity --title="请输入密码" --hide-text --entry --text=我受不了了,密码还是错误,请重新输入ROOT密码)
echo $mima | sudo -S losetup -a
fi
if [ $? -eq 1 ]
then
zenity --info --title="退出" --text=你退出吧,我无话可说!
exit
fi
#zenity --info --text=$mima
#######################################################
function umountdevice() {
loadediso=$(sudo losetup -a)
if [ "${loadediso}" != "" ] ; then
sudo losetup -a | grep /dev/loop | sed 's/\:.* (/ / ; s/),*.*/ /' | while read looppath isloaded ; do
isoloadpath=$(sudo mount|grep "$looppath" | sed 's/^.* on // ; s/ type.*$//')
isloaded=$(echo ${isloaded} | sed 's/ /\\ /g ; s/(/\\(/g ; s/)/\\)/g;s/&/\\&/; s/;/\\;/')
isoloadpath=$(echo ${isoloadpath} | sed 's/ /\\ /g ; s/(/\\(/g ; s/)/\\)/g;s/&/\\&/; s/;/\\;/')
echo -n FALSE >> /tmp/mountedlist.txt
echo -n " " >> /tmp/mountedlist.txt
echo -n ${looppath} >> /tmp/mountedlist.txt
echo -n " " >> /tmp/mountedlist.txt
echo -n ${isoloadpath} >> /tmp/mountedlist.txt
echo -n "/ " >> /tmp/mountedlist.txt
echo -n ${isloaded} >> /tmp/mountedlist.txt
echo -n " " >> /tmp/mountedlist.txt
done
xianshilist="zenity --title="已加载的loop设备" --width=1000 --height=350 --list --checklist --column="选择" --column="loop设备" --column="加载点" --column="文件路径" $(cat /tmp/mountedlist.txt)"
selectlist=`eval ${xianshilist}`
selectlist=$(echo $selectlist | sed 's/|/ /g')
echo $selectlist | sed 's/ /\n/g' | while read looppath ; do
[ "${looppath}"x == ""x ] && exit 0
isoloadpath=`sudo mount|grep "${looppath}" | sed 's/^.* on // ; s/ type.*$//'`
echo -n "${isoloadpath}" | sed 's/ /\\ /g ; s/(/\\(/g ; s/)/\\)/g;s/&/\\&/; s/;/\\;/' >> /tmp/mountpointlist
echo -n "/ " >> /tmp/mountpointlist
done
deldirlist="`cat /tmp/mountpointlist`"
umounttest="sudo umount "$deldirlist""
eval $umounttest
[ "${deldirlist}"x == ""x ] && exit 0
deldir="sudo rmdir "${deldirlist} 2>> /tmp/delerror.txt""
eval $deldir 2>> /tmp/delerror.txt
[ -s /tmp/delerror.txt ] && zenity --title= --text-info --filename=/tmp/delerror.txt
exit 0
fi
[ "${loadediso}"x == ""x ] && zenity --title= --info --text=你没有加载任何的loop设备
}
##################################################################
if [ -d "${isopath}" ] ; then
umountdevice
exit 0
fi
if [ -z ${NAUTILUS_SCRIPT_SELECTED_FILE_PATHS} ] && [ ! -z ${NAUTILUS_SCRIPT_CURRENT_URI} ] ; then
umountdevice
exit -
fi
##################################################################
loadediso=$(sudo losetup -a)
appurl=`echo "${isopath}" | sed 's/^\/.*\///'` #| sed 's/.iso//'`
nrgtest=`echo "${isopath}" | grep "\(\.nrg\)$"`
if [ ! -z "$nrgtest" ]; then
offset="offset=307200"
fi
[ "${loadediso}"x = ""x ] && [ -d /media/"${appurl}" ] && sudo mount -o loop,iocharset=utf8,"${offset}" "${isopath}" /media/"${appurl}" 2> /tmp/mounterror
[ "${loadediso}"x = ""x ] && [ ! -d /media/"${appurl}" ] && sudo mkdir /media/"${appurl}" && sudo mount -o loop,iocharset=utf8,"${offset}" "${isopath}" /media/"${appurl}" 2> /tmp/mounterror
#[ -s /tmp/mounterror ] && sudo rmdir /media/"${appurl}"
[ "${loadediso}" != "" ] && sudo losetup -a | grep /dev/loop | sed 's/\:.* (/ / ; s/)$//' | while read looppath isloaded ; do
isloadedfilename=$(echo $isloaded | sed 's/^\/.*\///')
[ "${isloaded}" != "${isopath}" ] && [[ "${isofilename}" != "${isloadedfilename}" ]] && continue
[ "${isloaded}" != "${isopath}" ] && [ "${isofilename}" == "${isloadedfilename}" ] && isoloadpath=`sudo mount|grep "$looppath" | sed 's/^.* on // ; s/ type.*$//'` && echo "${isoloadpath}" > /tmp/samenamefilepath && continue
[ "${isloaded}" == "${isopath}" ] && isoloadpath=`sudo mount|grep "$looppath" | sed 's/^.* on // ; s/ type.*$//'` && echo "${isoloadpath}" > /tmp/filepath
done
if [ -f /tmp/samenamefilepath ] ; then
while read isoloadpath ; do
zenity --title= --info --text=你选择的文件没有加载,但已经有一个同名文件已经加载到了"${isoloadpath}"
done < /tmp/samenamefilepath
fi
if [ -f /tmp/filepath ] ; then
while read isoloadpath ; do
zenity --title= --info --text=你选择的文件已经加载到了"${isoloadpath}"
done < /tmp/filepath
fi
if [ ! -f /tmp/filepath ] && [ ! -f /tmp/samenamefilepath ] ; then
[ "$loadediso" != "" ] && [ -d /media/"${appurl}" ] && sudo mount -o loop,iocharset=utf8,"${offset}" "${isopath}" /media/"${appurl}" 2>/tmp/mounterror
fi
if [ ! -f /tmp/filepath ] && [ ! -f /tmp/samenamefilepath ] ; then
[ "$loadediso" != "" ] && [ ! -d /media/"${appurl}" ] && sudo mkdir /media/"${appurl}" && sudo mount -o loop,iocharset=utf8,"${offset}" "${isopath}" /media/"${appurl}" 2>/tmp/mounterror
#[ -s /tmp/mounterror ] && sudo rmdir /media/"${appurl}"
fi
ftet="mount: 您必须指定文件系统类型"
[ ! -f /tmp/filepath ] && [ ! -f /tmp/samenamefilepath ] && if [ -s /tmp/mounterror ] ; then
fte=`cat /tmp/mounterror`
[ "$ftet" != "$fte" ] && sudo rmdir /media/"${appurl}" && zenity --title= --text-info --filename=/tmp/mounterror && exit 0
[ "$ftet" == "$fte" ] && filetype=`zenity --title= --entry --text=系统无法识别该文件格式,请你指定文件格式` && sudo mount -t "${filetype}" -o loop,iocharset=utf8,"${offset}" "${isopath}" /media/"${appurl}" 2> /tmp/mounterror
[ -s /tmp/mounterror ] && sudo rmdir /media/"${appurl}" && zenity --title= --info --text=还是无法加载你选中的文件,可能系统无法支持该文件格式或文件已经损坏 && exit 0
[ ! -s /tmp/mounterror ] && zenity --title= --info --text=加载成功 && exit 0
else
zenity --title= --info --text=加载成功 && exit 0
fi
代码: 全选
sudo pacman -U virtualbox_bin-3.0.6-2-i686.pkg.tar.gz
代码: 全选
none /proc/bus/usb usbfs auto,busgid=121,busmode=0775,devgid=121,devmode=0664 0 0
代码: 全选
文件系统 1K-块 已用 可用 已用% 挂载点
/dev/sda1 5565904 3583232 1699932 68% /
none 776604 168 776436 1% /dev
none 776604 0 776604 0% /dev/shm
/dev/sda5 4873880 1312840 3313452 29% /home
/dev/sda7 11957972 2883356 8467172 26% /windows/sda7
/dev/sda8 55286248 45292252 9993996 82% /windows/sda8
/dev/sdf2 6538560 2980116 3226304 49% /media/disk
/dev/sdf4 4625220 326968 4063304 8% /media/disk-1
/dev/sdf1 4184740 1286724 2898016 31% /media/disk-2
代码: 全选
VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/HardDisks/UsbDisk.vmdk -rawdisk /dev/sdf -register
崩溃错误解决办法错误,没有可用的拼写词典!
Load /usr/lib/stardict/plugins/stardict_spell.so failed!
代码: 全选
sudo mv /usr/lib/stardict/plugins/stardict_spell.so{,.bak}
代码: 全选
pacman -S gvim
代码: 全选
let &termencoding=&encoding
set fileencodings=utf-8,gbk,ucs-bom,cp936
代码: 全选
set encoding=utf8
set langmenu=zh_CN.UTF-8
set imcmdline
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
在Syu之前vi现在搞独立了,不再和vim牵扯
代码: 全选
sudo rm /usr/bin/{view,rview}
修改.vimrc# 安装 vim
sudo pacman -S vim –noconfirm
# 卸载 vi
sudo pacman -R vi
# 做个软链接,执行 visudo 的时候需要调用vi
ln -s /usr/bin/vim /usr/bin/vi
# 复制 vimrc 样板文件到 /etc 目录下
cp /usr/share/vim/vim72/vimrc_example.vim /etc/vimrc
代码: 全选
let &termencoding=&encoding
set fileencodings=utf-8,gbk,ucs-bom,cp936
finish
endif
” An example for a vimrc file.
”
” Maintainer: Bram Moolenaar
” Last change: 2008 Jul 02
”
” To use it, copy it to
” for Unix and OS/2: ~/.vimrc
” for Amiga: s:.vimrc
” for MS-DOS and Win32: $VIM\_vimrc
” for OpenVMS: sys$login:.vimrc
” When started as “evim”, evim.vim will already have done these settings.
if v:progname =~? “evim”
finish
endif
” Use Vim settings, rather then Vi settings (much better!).
” This must be first, because it changes other options as a side effect.
set nocompatible
” allow backspacing over everything in insert mode
set backspace=indent,eol,start
if has(”vms”)
set nobackup ” do not keep a backup file, use versions instead
else
set nobackup ” keep a backup file
endif
set history=50 ” keep 50 lines of command line history
set ruler ” show the cursor position all the time
set showcmd ” display incomplete commands
set incsearch ” do incremental searching
set nu “显示行号
” For Win32 GUI: remove ‘t’ flag from ‘guioptions’: no tearoff menu entries
” let &guioptions = substitute(&guioptions, “t”, “”, “g”)
” Don’t use Ex mode, use Q for formatting
map Q gq
” CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
” so that you can undo CTRL-U after inserting a line break.
inoremap u
” In many terminal emulators the mouse works just fine, thus enable it.
” 让vim支持鼠标复制内容,这个应该经常有用的,默认设置是mouse=a
if has(’mouse’)
set mouse=v
endif
” Switch syntax highlighting on, when the terminal has colors
” Also switch on highlighting the last used search pattern.
” 这里是设置高亮部分
if &t_Co > 2 || has(”gui_running”)
syntax on
set hlsearch
endif
” Only do this part when compiled with support for autocommands.
if has(”autocmd”)
” Enable file type detection.
” Use the default filetype settings, so that mail gets ‘tw’ set to 72,
” ‘cindent’ is on in C files, etc.
” Also load indent files, to automatically do language-dependent indenting.
filetype plugin indent on
” Put these in an autocmd group, so that we can delete them easily.
augroup vimrcEx
au!
” For all text files set ‘textwidth’ to 78 characters.
autocmd FileType text setlocal textwidth=78
” When editing a file, always jump to the last known cursor position.
” Don’t do it when the position is invalid or when inside an event handler
” (happens when dropping a file on gvim).
” Also don’t do it when the mark is in the first line, that is the default
” position when opening a file.
autocmd BufReadPost *
\ if line(”‘\”") > 1 && line(”‘\”") <= line(”$”) |
\ exe “normal! g`\”" |
\ endif
augroup END
else
set autoindent ” always set autoindenting on
endif ” has(”autocmd”)
” Convenient command to see the difference between the current buffer and the
” file it was loaded from, thus the changes you made.
” Only define it when not defined already.
if !exists(”:DiffOrig”)
command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
\ | wincmd p | diffthis
endif