Archlinux commands and scripts.
References:
sudo vim /etc/pacman.conf
# Update packages list:
sudo pacman -Syy
# run before installing any software (to update the repositories first)
sudo pacman -Syu
sudo timedatectl set-local-rtc 0sudo timedatectl set-timezone North America/New Yorksudo pacman -S ntpsudo ntpd -qgsudo hwclock -w/var/log/pacman.logcd /var/cache/pacman/pkg
# 1)
sudo pacman -Ud nvidia-utils-313.30-2-x86_64.pkg.tar.xz
# 2)
sudo pacman -Ud nvidia-313.30-5-x86_64.pkg.tar.xz
# 3)
sudo pacman -Ud virtualbox-host-modules-4.2.12-3-x86_64.pkg.tar.xz
# 4)
sudo pacman -U linux-3.8.11-1-x86_64.pkg.tar.xz
# 5)
sudo pacman -U virtualbox-4.2.12-3-x86_64.pkg.tar.xz
vim /etc/pacman.d/mirrorlistServer = http://mirror.nus.edu.sg/archlinux/$repo/os/$arch
sudo pacman -S xorg
sudo pacman -S xorg-twm xorg-xclock xterm
startx
Sound is muted by default, so need to unmuted it: ArchLinux Wiki - Sound
sudo pacman -S alsa-utilssudo vim /etc/local.gen
sudo locale-gen
lsmod | grep loop
sudo modprobe loop
sudo tee /etc/modules-load.d/truecrypt.conf <<< "loop"
sudo ip link set wlo1 up
sudo wpa_supplicant -i wlo1 -c /etc/wpa_supplicant.conf &
sudo dhcpcd wlo1
sudo pacman -S wpa_supplicant_guinetwork={
ssid="Nha06-16-30 co j nhieu I"
# psk="gaidepnhieuI"
psk=35a7546f8885820d05a6fdbfa2e388191b977be3ba9d514b46da38623a7e0333
}
ap_scan=1
sudo iwconfig wlo1 essid "NAAEC" key 0050263557
# if using ASCII key:
sudo iwconfig wlo1 essid "MyWiFiID" key s:asciikey
sudo dhcpcd wlo1
sudo pacman -S ntfs-3gmount -t ntfs-3g /dev/<device> /mnt/<folder>sudo pacman -S base-develmakepkg -ssudo pacman -S ttf-dejavu~/.fontsfc-cache -fvsudo pacman -S tumbler
tar xvfz <filename.tar.gz>makepkg -ssudo pacman -U <filename.xz>sudo rmmod pcspkrsudo echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.confcat /var/log/Xorg.0.log | grep EE
/etc/X11/xorg.conf # if cannot start X, delete this file! EVIL file
Various fixes and tweaks to ArchLinux after standard install.
pacman -S vlc
/usr/lib/vlc/vlc-cache-gen -f usr/lib/vlc/plugins
pacman -S vlc # just to be sure ;)
makepkgalsi~/.config/alsi/jounrnalctl -xnPlease run "echo 100000 | sudo tee /proc/sys/fs/inotify/max_user_watches" and restart Dropbox to correct the problem.sudo vi /etc/sysctl.conffs.inotify.max_user_watches = 100000rm -R .gconf .gnome2 .config/xfce4 .config/xfce4-session .cache
pacman -Syu before and after the installation of xfce, but my problem was after the installation there was a file at /etc/profile.d/locale.sh that was causing a conflict and not allowing the system to update at all. I never noticed it and when it went back to the cursor so fast I automatically assumed everything was up to date and it had nothing to do. I removed the locale.sh file, ran pacman -Syu, and everything updated as it should and xfce works flawlessly now./etc/profile.d/locale.sh before updating. If . /etc/rc.conf fails in your login shell, please read the full announcement.pmount /dev/sdc1/etc/pacman.conf
#[multilib]
Include = /etc/pacman.d/mirrorlist
sudo systemctl start teamviewerdvim .config/openbox/autostartobconfsudo pacman -S menumaker ...mmaker -vf OpenBox3 # this will rescan all the installed application & overwrite the existing menu.xml file
tint2 : taskbar
tint2conf~/.config/tint2/tint2rcopenbox --restart
[xcompmgr](https://wiki.archlinux.org/index.php/Xcompmgr]
[Wallpaper]https://wiki.archlinux.org/index.php/Feh)
feh --bg-center ~/wallpapers/ArchLinux01.jpgSuspend: pm-suspend
sudo pacman -S pm-utils/etc/pm/sleep.d/00screensaver-lock#!/bin/sh
#
# lock workstation on hibernate or suspend
username=squallltt # add username here; i.e.: username=foobar
userhome=/home/$username
export XAUTHORITY="$userhome/.Xauthority"
export DISPLAY=":0"
case "$1" in
hibernate|suspend)
su $username -c "/usr/bin/slock" & # or any other such as /usr/bin/xscreensaver-command -lock
;;
thaw|resume)
;;
*) exit $NA
;;
esac
chmod to 755, # and make sure it owns by root:root
Arch IRC members say don't use pm-*crap, use this instead:
systemctl suspendslock.service and put it in /etc/systemd/system/[Unit]
Description=Lock X session using slock - Tung
[Service]
User=squallltt
Environment=DISPLAY=:0
ExecStart=/usr/bin/slock
[Install]
WantedBy=sleep.target
sudo systemctl enable slock.servicesystemctl -t service -a | grep slock~/.config/openbox/autostart: xset r rate 200 30Theme:
sudo pacman -S lxappearance # this allows us to change gtk application theme)export GTK2_RC_FILES="$HOME/.gtkrc-2.0" to .xinitrc file/usr/bin/qtconfig-qt4sudo pacman -S transset-dftransset-df <value> # where value between 0..1sudo pacman -S devilspiexcompmgr &devilspie -a &vim ~/.devilspie/opacity.dssudo pacman -S intel-dri xf86-video-intel bumblebee nvidiagpasswd -a squallltt bumblebeesystemctl enable bumblebeed/etc/bumblebee/bumblebee.conf from false to true
~/.xinitrc has:
sudo VBoxClient-all &
sudo systemctl start vboxservice.service
then need to make sure that we don't need sudo password for
VBoxClient-all and systemctl (or else, we will receive error
EnterVT failed for screen 0). Solving by doing this:
sudo visudo -f /etc/sudoerssquallltt ALL = PASSWD: ALL, NOPASSWD: /usr/bin/VBoxClient-all, /usr/sbin/ip, /usr/sbin/wpa_supplicant, /usr/sbin/dhcpcd, /usr/bin/truecrypt, /usr/bin/systemctl
VBoxManage setextradata global GUI/Customizations noMenuBar,noStatusBar
cmap w!! w !sudo tee %vim /path/to/filew!!vim ~/.irssi/config/connect irc.freenode.net/<username> YourIRCName/SERVER ADD -auto -network freenode irc.freenode.net 6667 <password>
/CHANNEL ADD -auto #ubuntu freenode/NETWORK ADD -autosendcmd "/^msg MyServer IDENTIFY password;wait 2000" freenodeignores = (
{
level = "JOINS PARTS QUITS";
channels = ( "#archlinux", "#vim", "#python" );
network = "FreeNode";
},
{
level = "MODES";
channels = ( "&bitlbee" );
network = "BitlBee";
}
);
gtk-recordmydesktop
fuseiso -p testimage.iso testimagemountpointfusermount -u <mountpoint>Unable to locate theme engine in module_path: "murrine"
sudo pacman -S gtk-enginessudo pacman -S gtk-engine-murrinexrandrxrandr --output VGA1 --mode 1920x1080journalctl -xnlspci -nnk | grep -i vga -A3 | grep 'in use'pacman -Rs package_namesudo pacman -Rs nautilus #remove nautilussudo pacman -Syusudo pacman -Qdtpacman -Q > pacman.txt
pacman -Qqe > pacman.txt
pacman -Qi | sed '/^Name/{ s/ *//; s/^.* //; H;N;d}; /^URL/,/^Build Date/d; /^Install Reason/,/^Description/d; /^ */d;x; s/^.*: ... //; s/Jan/01/; s/Feb/02/; s/Mar/03/; s/Apr/04/; s/May/05/; s/Jun/06/; s/Jul/07/; s/Aug/08/; s/Sep/09/; s/Oct/10/; s/Nov/11/; s/Dec/12/; / [1-9]\{1\} /{ s/[[:digit:]]\{1\}/0&/3 }; s/\(^[[:digit:]][[:digit:]]\) \([[:digit:]][[:digit:]]\) \(.*\) \(....\)/\4-\1-\2 \3/' | sed ' /^[[:alnum:]].*$/ N; s/\n/ /; s/\(^[[:graph:]]*\) \(.*$\)/\2 \1/; /^$/d' > pacman.txt
###
# display installed packages, sorted by size
pacsysclean > pacman.txt
# search for keyword "gnome" in the installed package
sudo pacman -Qs gnome
xrandr --output LVDS1 --offsudo useradd -m -g [initial_group] -G [additional_groups] -s [login_shell] [username]
sudo passwd [username]sudo groupadd squalllttsudo gpasswd -a squallltt squallltttar -tvf em-4.0.15-lt.tar.gz | moreunrar l file.rarunzip -l file.zipip addrsudo systemctl start sshdsudo systemctl enable sshd.servicesudo systemctl enable sshd.socket/etc/skel/scp /path/to/my.file me@serverB:/path/to/destination/my.filecp -R * destination_pathsynclient TouchpadOff=1find . -name "*.tmp" -exec rm -rfv {} +find . -name "*conflict*" -exec rm -rfv {} +svn propedit svn:ignore .svn propset svn:ignore .git .~/.subversion/configglobal-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo * .strippeddmesg
sudo journalctl -xb
sudo cat /proc/kmsg
free -mAdd this to .bashrc
# change system-wide editor
export VISUAL="/usr/bin/vim -p -X"
export EDITOR=vim
sudo pacman -S tightvncvncserver~/.vnc/xstartupvncserver -geometry 1440x900 -alwaysshared -dpi 96 :1vncserver -kill :1vncviewer 192.168.0.150:1ssh-agentssh-add
vim ~/.config/openbox/environmentSSHAGENT="/usr/bin/ssh-agent"
SSHAGENTARGS="-s"
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then
eval `$SSHAGENT $SSHAGENTARGS`
trap "kill $SSH_AGENT_PID" 0
fi
Ctrl + M
sudo pacman -S dosfstools
sudo modprobe vboxdrv
sudo mount -t vboxsfprw-r--r-- 1 squallltt users
mount -t vboxsf [-o OPTIONS] sharename mountpointyaourt -Syuasudo pacman -S ethtool
sudo ethtool enp3s0 | grep MDI-X
sudo ethtool enp3s0
ranger --copy-config=allyaourt trash-cli~/.config/ranger/rc.conf
map <DELETE> shell trash-put %s
Specific to running Archlinux on RPi (raspberry pi).
pacman -S ttf-dejavuwhile true ;
do ./wireless-cron-job.sh ; sleep 15; done
sudo dd if=/dev/sdc of=~/raspberrypi_backup_20130514.imgsudo ifconfig eth0 192.168.0.137/etc/network.d/, adding:
CONNECTION="ethernet"
DESCRIPTION="IP over USB"
INTERFACE="usb0"
IP="static"
IFOPTS="192.168.42.42 netmask 255.255.255.0 network 192.168.42.0 broadcast 192.168.42.255"
TIMEOUT=10
#PRE_UP=
#POST_UP="iptables -t nat -A POSTROUTING -o eth0 -s 192.168.
sudo systemctl enable dhcpcd@usb0sudo systemctl enable netcfg@usb0route add default gw 192.168.42.129 usb0/lib/i386-linux-gnu/libpthread.so.0:Could not read symbols: Invalid operation when compiling raspi camera;
- Add ``-lX11 -lpthread`` to the linker script
pacman -S intel-dri xf86-video-intel bumblebee nvidiagpasswd -a $USER bumblebee
systemctl enable bumblebeed
sudo pacman -S vlcsudo pacman -S firefoxsudo pacman -S zathurasudo pacman -S zathura-pdf-popplersudo pacman -S zathura-djvusudo pacman -S chromiumsudo pacman -S flashpluginsudo pacman -S gstreamer0.10-plugins # required for GNU flash to play videosudo pacman -S gitsudo pacman -S gpicviewsudo pacman -S xfce4-screenshooterxfce4-screenshooter # assign to PrintScreen keysudo pacman -S bansheesudo pacman -S jdk7-openjdksudo pacman -S slocksudo pacman -S texlive-mostpacman management system:pacman -Sy # synchronize repository databases if neccessary
pacman -Syy # force synchronization of repository databases
pacman -Ss xyz # search repository database for packages for xyz
pacman -S xyz # install package xyz
pacman -Sy xyz # synchronize repo and install xyz
pacman -Syy xyz # really synchronize repo and install xyz
pacman -R xyz # remove package xyz but keep its dependencies installed
pacman -Rs xyz # remove package xyz and all its dependencies (if they are not required by any other package)
pacman -Rsc xyz # remove package xyz, all its dependencies and packages that depend on the target package
pacman -Ql xyz # show all files installed by the package xyz
pacman -Qo /path # find the package which installed the file at /pat