Arch真正好

Arch真正好
2011年09月01日
  http://www.archlinux.org/
  ftp://ftp.archlinux.org/iso/archboot/
  先装arch后装win,grub丢失的解决:
  主分区被win区占光的情况下,把boot标签打在逻辑arch区是跑不了系统的,只能拿出arch安装盘,在一个剩余分区里装“/”,一步步装下来直到grub,重新把grub打在/dev/sda上,然后进临时的新系统,把原arch分区(/dev/sda5)里的menu.lst拷过来。
  mkdir /mnt/tmp mount /dev/sda5 /mnt/tmp cp /boot/grub/menu.lst /boot/grub/menu.lst.0 cp /mnt/tmp/boot/grub/menu.lst /boot/grub/menu.lst reboot
  配置文件
  #grub /boot/grub/menu.lst #启动 /etc/rc.conf /etc/inittab ~/.bashrc ~/.xinitrc #被访问配置 /etc/hosts.allow #pacman /etc/pacman.conf XferCommand = /usr/bin/aria2c -s 5 %u [multilib] Include = /etc/pacman.d/mirrorlist [archlinuxfr] Server = http://repo.archlinux.fr/x86_64 #[arch-games] #Server = http://arch.twilightlair.net/games/i686/ /etc/pacman.d/mirrorlist Server = http://mirrors.163.com/archlinux/$repo/os/x86_64 #查看列表 pacman -Sl arch-games #清理旧包缓存 pacman -Sc #网络配置 /etc/rc.conf eth0="eth0 192.168.1.59 netmask 255.255.255.0 broadcast 192.168.1.255" gateway="default gw 192.168.1.1" ROUTES=(gateway) /etc/dhcpcd.conf 注释所有 /etc/resolv.conf #如果有路由器 nameserver 192.168.1.1 #同步时间 DEAMON + @openntpd
  zsh
  /etc/passwd
  自己账号最后项改成 /bin/zsh
  ~/.zshrc
  # Lines configured by zsh-newuser-install HISTFILE=~/.histfile HISTSIZE=1000 SAVEHIST=1000 bindkey -e # End of lines configured by zsh-newuser-install # The following lines were added by compinstall zstyle :compinstall filename '/home/q/.zshrc' autoload -Uz compinit compinit # End of lines added by compinstall ##在命令前插入 sudo {{{ #定义功能 sudo-command-line() { [[ -z $BUFFER ]] && zle up-history [[ $BUFFER != sudo\ * ]] && BUFFER="sudo $BUFFER" zle end-of-line #光标移动到行末 } zle -N sudo-command-line #定义快捷键为: [Esc] [Esc] bindkey "\e\e" sudo-command-line #}}} #kill 命令补全 compdef pkill=killall zstyle ':completion:*:*:kill:*' menu yes select zstyle ':completion:*:*:*:*:processes' force-list always zstyle ':completion:*:processes' command 'ps -au$USER' # Normal aliases alias ls='ls --color=auto -F' alias lsd='ls -ld *(-/DN)' alias lsa='ls -ld .*' alias f='find |grep' alias c="clear" alias dir='ls -1' alias gvim='gvim -geom 82x35' alias ..='cd ..' alias ge='sudo gedit' alias pacupg='sudo pacman-color -Syu' # synchronize with repositories before upgrading packages that are out of date on the local system. alias pacin='sudo pacman-color -S' # install specific package(s) from the repositories alias pacins='sudo pacman-color -Up' # install specific package not from the repositories as a file alias pacre='sudo pacman-color -R' # remove the specified package(s), retaining its configuration(s) and required dependencies alias pacrem='sudo pacman-color -Rns' # remove the specified package(s), its configuration(s) and unneeded dependencies alias pacrep='pacman-color -Si' # display information about a given package in the repositories alias pacreps='pacman-color -Ss' # search for package(s) in the repositories alias pacloc='pacman-color -Qi' # display information about a given package in the local database alias paclocs='pacman-color -Qs' # search for package(s) in the local database export PS1="$(print '%{\e[1;34m%}%n@hululuu%{\e[0m%}'):$(print '%{\e[0;34m%}%~%{\e[0m%}')$ " export PS2="$(print '%{\e[0;34m%}>%{\e[0m%}')"
  基础
  pacman -S yaourt pacman -S base-devel
  图形界面gnome nvidia
  pacman -S xorg nvidia gnome gnome-extra ~/.xinitrc exec ck-launch-session gnome-session /etc/inittab init 5 gdm #hal加入daemons DAEMONS=(syslog-ng network netfs hal @openntpd @crond @alsa)
  声音
  pacman -S alsa-utils alsa-lib alsa-oss #alsa启动失败: pacman -R oss reboot
  wine + qq
  yaourt bin32-wine yaourt bin32-winetricks winetricks msxml3 gdiplus riched20 riched30 ie6 vcrun6 vcrun2005sp1 yaourt libpng12 去掉scim设置的 前端->全局设置->将预编辑字符串嵌入到客户端中 前的勾 去掉scim设置的 面板->gtk->嵌入式候选词标 下载深度qq2009 http://www.orsoon.com/Soft/7762.html 褪两层皮拷贝至 /home/q/.wine/dosdevices/c:/Program Files/Tencent/QQ/ regedit zh.reg REGEDIT4 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes] "Arial"="simsun" "Arial CE,238"="simsun" "Arial CYR,204"="simsun" "Arial Greek,161"="simsun" "Arial TUR,162"="simsun" "Courier New"="simsun" "Courier New CE,238"="simsun" "Courier New CYR,204"="simsun" "Courier New Greek,161"="simsun" "Courier New TUR,162"="simsun" "FixedSys"="simsun" "Helv"="simsun" "Helvetica"="simsun" "MS Sans Serif"="simsun" "MS Shell Dlg"="simsun" "MS Shell Dlg 2"="simsun" "System"="simsun" "Tahoma"="simsun" "Times"="simsun" "Times New Roman CE,238"="simsun" "Times New Roman CYR,204"="simsun" "Times New Roman Greek,161"="simsun" "Times New Roman TUR,162"="simsun" "Tms Rmn"="simsun" #图标command env LANG=zh_CN.UTF-8 wine "C:/Program Files/Tencent/QQ/bin/QQ.exe" #qq启动不出 yaourt lib32-libpng12 #重装 最小化消失:右键add to panel > notification area #聊天窗口里敲中文: #fcitx ~/.xprofile #export LC_CTYPE="zh_CN.utf8" export GTK_IM_MODULE=xim export QT_IM_MODULE=xim export XMODIFIERS="@im=fcitx" #killall fcitx fcitx & #ibus ibus-pinyin ~/.xprofile export GTK_IM_MODULE=ibus export XMODIFIERS=@im=ibus export QT_IM_MODULE=ibus ibus & #scim scim-pinyin scim-bridge ~/.bashrc export LC_CTYPE="zh_CN.utf8" export XIM="scim-bridge" export XMODIFIERS=@im=SCIM export GTK_IM_MODULE=scim export QT_IM_MODULE=scim export XIM_PROGRAM="scim -d" scim -d #解决小方块 sudo ln -s /usr/lib/locale /usr/lib32/
  virtaulbox
  http://download.virtualbox.org/virtualbox/vboxdown load.html#linux 或者 yaourt virtualbox #x86 sh ./VirtualBox-3.1.2-56127-Linux_amd64.run #升级内核后须要重新安装 /etc/rc.d/rc.vboxdrv setup #virtualbox启动不出: pacman -S lib32-libxcursor #virtualbox spawning session... 0%: /etc/rc.d/rc.vboxdrv setup #图标显示不出 yaourt -S libpng12 #windows2003 guest中获取vbox共享 net use M: \\vboxsrv\src
  有用的东西
  #pacman-color pacman-color #下载 wget aria2 powerpill #时间 opentpd #slim登录 slim /etc/slim.conf #退回console ctrl+alt+f5 #赋于用户组权限 gpasswd -a [user] [group] #更新locale locale-gen #ntfs中文 ntfs-3g #浏览器 firefox firefox-i18n flashplugin chromium gecko-mediaplayer #字体 http://wiki.archlinux.org/index.php/%E4%B8%AD%E6%9 6%87%E5%AD%97%E4%BD%93%E9%85%8D%E7%BD%AE%E8%8C%83%E 4%BE%8B_%28%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87%29 wqy-bitmapfont wqy-zenhei #添加宋体字体 基于雅黑6.01的等宽替换宋体2.12 标准版 http://www.rayfile.com/zh-cn/files/aee45a19-e623-1 1dd-80f4-0014221b798a/ 宋体粗体 http://www.rayfile.com/zh-cn/files/f6e098cc-e623-1 1dd-ac13-0014221b798a/ p7zip cd /usr/share/fonts sudo cp ~/Downloads/simsun.ttc . sudo mkfontscale sudo mkfontdir sudo fc-cache -fv #以管理员身份打开文件浏览器 sudo nautilus --browser #dropbox yaourt dropbox nautilus-dropbox dropbox start #刻盘 brasero #pdf阅读 evince #office openoffice-base #播放器 mplayer codecs-all smplayer gnome-mplayer yaourt deadbeef #gmplayer中文字幕 ~/.mplayer/config [gnome-mplayer] vo=x11 subcp=cp936 font=/usr/share/fonts/wenquanyi/wqy-zenhei.ttc #打包、解包 tar cvf my.tar dir1 dir2 tar xvf my.tar zip -r my.zip dir1 #显示当前所在路径 pwd #重启&关机 reboot halt #开机时CHECK硬盘 fsck #查看进程详细 ps aux |grep php-cgi #Rdesktop rdesktop -g 93% -a 8 -u administrator host.ip -p #相当于mstsc /console、共享本地文件夹: rdesktop -g 93% -a 8 -u administrator -0 host.ip -r disk:Share=/home/user_name/share_folder -p #Stardict stardict #stardict启动不了 sudo mv /usr/lib/stardict/plugins/stardict_spell.so{,.bak}
  fcitx激活不了的解决
  /etc/rc.conf LOCALE="en_US.UTF-8" HARDWARECLOCK="localtime" TIMEZONE="Asia/Shanghai" KEYMAP="us" CONSOLEFONT= CONSOLEMAP= USECOLOR="yes" ~/.bashrc export GTK_IM_MODULE=xim export QT_IM_MODULE=xim export XMODIFIERS="@im=fcitx" ~/.xprofile killall fcitx fcitx & ~/.xinitrc exec ck-launch-session gnome-session #带访问挂载硬盘权限启动 #解决小方块 sudo gedit 选择 /usr/share/fcitx/data/config 以编码GBK打开 显示字体(中)=WenQuanYi Bitmap Song 快捷键 ctrl+alt+左右:切换桌面
  themes
  http://www.gnome-look.org/content/show.php/GNOME-c olors?content=82562
  http://www.gnome-look.org/content/show.php/Any+Col or+You+Like?content=102435
  http://www.gnome-look.org/content/show.php/Shiki-C olors?content=86717
  http://www.gnome-look.org/content/show.php/Wasp?co ntent=104167
  yaourt shiki-colors gnome-colors gnome-art-ng
  中文wiki
  http://wiki.archlinux.org/index.php/Category:%E7%A E%80%E4%BD%93%E4%B8%AD%E6%96%87
  
  
<think>首先,用户的问题是关于Arch Linux的,具体是查询“如何在Arch Linux系统中将网络接口设置为down状态”,并询问“arch linux ip link set down command”。所以,我需要提供使用`ip link set`命令来设置网络接口为down状态的指令。 关键命令是`ip link set dev [interface] down`,其中`[interface]`是网络接口的名称,如`eth0`或`wlan0`。 参考系统指令: - 所有行内数学表达式用$...$格式。但这里没有数学表达式,所以可能不需要。 - 独立公式用$$...$$并单独成段。同样,不适用。 - LaTeX语法正确:确保任何LaTeX正确。 - 使用中文回答:整个响应要用中文。 - 生成相关问题:在回答后添加相关问题部分。 - 在引用的段落末尾添加引用标识:引用用户提供的引用内容,但用户说“上述引用仅供参考,并不是用户正的需求”,所以我应该基于用户意图回答,而不是直接引用这些。用户意图是查询设置网络接口为down的命令。 用户提供的引用: - [^1]: 关于退出虚拟PC的Arch Linux安装。 - [^2]: 关于`ip neighbour`命令的示例。 - [^3]: 关于设置Docker镜像仓库的错误。 - [^4]: 关于`chmod`命令更改权限。 这些引用似乎不直接相关,用户说“请尽可能多的参考用户上一次的问题和你的回答”,但这是新对话,没有上一次问题。用户说“我想用户意图是查询如何在Arch Linux系统中将网络接口设置为down状态”,所以我专注于这个。 回答结构: - 清晰、逐步解决问题。 - 保证实可靠:基于Arch Linux的标准命令。 步骤: 1. 解释命令:`ip link set dev [interface] down` 2. 提供示例:例如,设置eth0为down。 3. 说明如何找到接口名称:使用`ip link show`。 4. 强调需要root权限:使用`sudo`。 5. 添加注意事项:比如设置down后网络中断。 然后,生成相关问题。 最终响应结构: - 开头解释命令。 - 提供代码块示例。 - 添加相关问题部分。 用中文写。</think>### 在Arch Linux中设置网络接口为down状态 在Arch Linux系统中,您可以使用`ip`命令(来自`iproute2`软件包)来管理网络接口。要设置网络接口为down状态(即禁用网络连接),核心命令是`ip link set dev [接口名称] down`。以下是详细步骤和说明: 1. **确认网络接口名称**: 首先,您需要知道要操作的网络接口名称(如`eth0`、`wlan0`或`enp0s3`)。使用以下命令列出所有接口: ```bash ip link show ``` 输出中会显示接口列表,例如: ``` 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff ``` 这里,`eth0`是常见的以太网接口名称(具体名称可能因系统而异)。 2. **设置接口为down状态**: 使用`ip link set dev [接口名称] down`命令。例如,禁用`eth0`接口: ```bash sudo ip link set dev eth0 down ``` - **说明**: - `sudo`:该命令需要root权限,因此在普通用户下需加`sudo`(或在root用户下直接运行)。 - `dev eth0`:指定要操作的设备(替换`eth0`为您的实际接口名称)。 - `down`:将接口状态设置为down,这会断开网络连接。 - 操作后,验证状态:运行`ip link show eth0`,输出中应显示`state DOWN`。 3. **注意事项**: - **影响**:设置接口为down会立即中断该接口的网络连接。请确保您不需要当前网络会话(如SSH连接),否则可能导致无法远程访问系统。 - **恢复接口**:要重新启用接口,使用`ip link set dev [接口名称] up`命令,例如: ```bash sudo ip link set dev eth0 up ``` - **持久化设置**:上述命令是临时的(重启后失效)。如果需永久禁用接口,需编辑网络配置文件(如使用`systemd-networkd`或`Netctl`),但这超出本命令范围[^1]。 - **依赖软件包**:`ip`命令在Arch Linux默认安装中已包含。如果缺失,可通过`sudo pacman -S iproute2`安装[^2]。 此方法基于Arch Linux的官方文档和常见管理实践,确保操作可靠。如果您遇到权限问题(如`sudo`未配置),请先切换到root用户。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值