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 0
sudo timedatectl set-timezone North America/New York
sudo pacman -S ntp
sudo ntpd -qg
sudo hwclock -w
/var/log/pacman.log
cd /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/mirrorlist
Server = 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-utils
sudo 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_gui
network={
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-3g
mount -t ntfs-3g /dev/<device> /mnt/<folder>
sudo pacman -S base-devel
makepkg -s
sudo pacman -S ttf-dejavu
~/.fonts
fc-cache -fv
sudo pacman -S tumbler
tar xvfz <filename.tar.gz>
makepkg -s
sudo pacman -U <filename.xz>
sudo rmmod pcspkr
sudo echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf
cat /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 ;)
makepkg
alsi
~/.config/alsi/
jounrnalctl -xn
Please run "echo 100000 | sudo tee /proc/sys/fs/inotify/max_user_watches" and restart Dropbox to correct the problem.
sudo vi /etc/sysctl.conf
fs.inotify.max_user_watches = 100000
rm -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 teamviewerd
vim .config/openbox/autostart
obconf
sudo pacman -S menumaker
...mmaker -vf OpenBox3 # this will rescan all the installed application & overwrite the existing menu.xml file
tint2 : taskbar
tint2conf
~/.config/tint2/tint2rc
openbox --restart
[xcompmgr](https://wiki.archlinux.org/index.php/Xcompmgr]
[Wallpaper]https://wiki.archlinux.org/index.php/Feh)
feh --bg-center ~/wallpapers/ArchLinux01.jpg
Suspend: 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 suspend
slock.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.service
systemctl -t service -a | grep slock
~/.config/openbox/autostart
: xset r rate 200 30
Theme:
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-qt4
sudo pacman -S transset-df
transset-df <value> # where value between 0..1
sudo pacman -S devilspie
xcompmgr &
devilspie -a &
vim ~/.devilspie/opacity.ds
sudo pacman -S intel-dri xf86-video-intel bumblebee nvidia
gpasswd -a squallltt bumblebee
systemctl 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/sudoers
squallltt 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/file
w!!
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" freenode
ignores = (
{
level = "JOINS PARTS QUITS";
channels = ( "#archlinux", "#vim", "#python" );
network = "FreeNode";
},
{
level = "MODES";
channels = ( "&bitlbee" );
network = "BitlBee";
}
);
gtk-recordmydesktop
fuseiso -p testimage.iso testimagemountpoint
fusermount -u <mountpoint>
Unable to locate theme engine in module_path: "murrine"
sudo pacman -S gtk-engines
sudo pacman -S gtk-engine-murrine
xrandr
xrandr --output VGA1 --mode 1920x1080
journalctl -xn
lspci -nnk | grep -i vga -A3 | grep 'in use'
pacman -Rs package_name
sudo pacman -Rs nautilus #remove nautilus
sudo pacman -Syu
sudo pacman -Qdt
pacman -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 --off
sudo useradd -m -g [initial_group] -G [additional_groups] -s [login_shell] [username]
sudo passwd [username]
sudo groupadd squallltt
sudo gpasswd -a squallltt squallltt
tar -tvf em-4.0.15-lt.tar.gz | more
unrar l file.rar
unzip -l file.zip
ip addr
sudo systemctl start sshd
sudo systemctl enable sshd.service
sudo systemctl enable sshd.socket
/etc/skel/
scp /path/to/my.file me@serverB:/path/to/destination/my.file
cp -R * destination_path
synclient TouchpadOff=1
find . -name "*.tmp" -exec rm -rfv {} +
find . -name "*conflict*" -exec rm -rfv {} +
svn propedit svn:ignore .
svn propset svn:ignore .git .
~/.subversion/config
global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo * .stripped
dmesg
sudo journalctl -xb
sudo cat /proc/kmsg
free -m
Add this to .bashrc
# change system-wide editor
export VISUAL="/usr/bin/vim -p -X"
export EDITOR=vim
sudo pacman -S tightvnc
vncserver
~/.vnc/xstartup
vncserver -geometry 1440x900 -alwaysshared -dpi 96 :1
vncserver -kill :1
vncviewer 192.168.0.150:1
ssh-agent
ssh-add
vim ~/.config/openbox/environment
SSHAGENT="/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 vboxsf
prw-r--r-- 1 squallltt users
mount -t vboxsf [-o OPTIONS] sharename mountpoint
yaourt -Syua
sudo pacman -S ethtool
sudo ethtool enp3s0 | grep MDI-X
sudo ethtool enp3s0
ranger --copy-config=all
yaourt trash-cli
~/.config/ranger/rc.conf
map <DELETE> shell trash-put %s
Specific to running Archlinux on RPi (raspberry pi).
pacman -S ttf-dejavu
while true ;
do ./wireless-cron-job.sh ; sleep 15; done
sudo dd if=/dev/sdc of=~/raspberrypi_backup_20130514.img
sudo 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@usb0
sudo systemctl enable netcfg@usb0
route 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 nvidia
gpasswd -a $USER bumblebee
systemctl enable bumblebeed
sudo pacman -S vlc
sudo pacman -S firefox
sudo pacman -S zathura
sudo pacman -S zathura-pdf-poppler
sudo pacman -S zathura-djvu
sudo pacman -S chromium
sudo pacman -S flashplugin
sudo pacman -S gstreamer0.10-plugins # required for GNU flash to play video
sudo pacman -S git
sudo pacman -S gpicview
sudo pacman -S xfce4-screenshooter
xfce4-screenshooter # assign to PrintScreen key
sudo pacman -S banshee
sudo pacman -S jdk7-openjdk
sudo pacman -S slock
sudo pacman -S texlive-most
pacman
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