MSI GE60 2OE
CPU: i7-4700
GPU: GTX 765M
Windows8 preinstalled.
Download the image from here.
https://www.archlinux.org/download/
And create an Arch linux installer USB drvie with dd command on a mac.
dd if=image.iso of=/dev/rdisk2 bs=1mfor other method in different platform, you may refer the arch wiki.
https://wiki.archlinux.org/index.php/USB_flash_installation_media
Note that you may need to disable secure boot.
Connect to the internet.
Wireless.
wifi-menu -o wlp5s0Update the system clock.
timedatectl set-ntp trueIdentify the divces.
lsblkUse cgdsik to partition.
cgdisk /dev/sdxFormat filesystem and mount it on /mnt.
mkfs.ext4 /dev/sdxx
mount /dev/sdxx /mntSelect the best mirror and install the base package.
vim /etc/pacman.d/mirrorlist
pacstrap -i /mnt base base-develMount the efi partition.
mkdir -p /mnt/boot/efi
mount /dev/sdxx /mnt/boot/efiGenerate fstab.
genfstab -U /mnt >> /mnt/etc/fstabChroot into arch isntallation
arch-chroot /mntSome configuration.
passwd
echo HOSTNAME >> /ect/hostname
tzselect
ln -s /usr/share/zoneinfo/ZONE/SUBZONE /etc/localtime
vi /etc/locale.gen
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8
hwclock --systohc --utc
mkinitcpio -p linuxNetwork
pacman -S iw wpa_supplicant dialog networkmanager
systemctl enable NetworkManagerGrub
pacman -S grub efibootmgr
grub-mkconfig -o /boot/grub/grub.cfg
grub-install /dev/sdXDesktop
pacman -S zsh vim guake gnome network-manager-applet
useradd -m -g users -G wheel -s /bin/zsh USERNAME
passwd USERNAME
pacman -S gdm
systemctl enable gdmUnmount and reboot
exit
umount -R /mnt
rebootnmcli dev wifi connect WIFISSID password WIFIPASSWROD
su
visudo
pacman -S os-prober
grub-mkconfig -o /boot/grub/grub.cfg
rebootsudo pacman -Syyu
sudo pacman -S wget chromium git mpv cmus gnome-tweak-tool zip unrar
sudo pacman -S python python2
sudo pacman -S wqy-bitmapfont wqy-zenhei ttf-arphic-ukai ttf-arphic-uming opendesktop-fontssudo pacman -S openssh
sudo systemctl enable sshd.socket
sudo systemctl start sshd.socket
sudo vi /etc/ssh/sshd_configsudo pacman -S xf86-input-synaptics xf86-input-libinput
synclietn TouchpadOff=1git clone https://aur.archlinux.org/package-query.git
cd package-query
makepkg -si
cd ..
git clone https//aur.archlinux.org/yaourt.git
cd yaourt
makepkg -si
cd ..mkdir /home.new
mount /dev/sdX /home.new
cp -a /home/user /home.new
umout /home.new
rm -rf /home
mv /home.new /home
mount /dev/sdX /home
lsblk -f
vim /etc/fstabsudo pacman -S ccache
echo 'export PATH="/usr/lib/ccache/bin/:$PATH" >> ~/.zshrc'
sudo vim /etc/makepkg.confIn BUILDDEV uncomment cache.
yaourt -S terminess-powerline-font-git
setfonts /usr/share/kbd/ter-powerline-v32n.psf.gz
vim /etc/vconsole.confthen set FONT=ter-powerline-v32n.
echo export TERM=xterm-256color >> ~/.zshrcyaourt -S arduino
sudo gpasswd -a $USER uucp
sudo gpasswd -a $USER locksudo pacman -S zip ntfs-3g
yaourt -S insync
sudo systemctl enable insync@<user>sudo pacman -S nmap wireshark netcat iptrafDownload the installer
ln -s /{MATLAB}/bin/matlab /usr/local/bin}
gpg --recv-keys F7E48EDB
yaourt -S ncurses5-compat-libs
./$MATLABROOT/bin/activate_matlab.shsudo pacman -S virtualbox virtualbox-host-modules-arch virtualbox-guest-iso qt4
yaourt -S virtualbox-ext-oracle
sudo systemctl start systemd-modules-load.service
sudo modprobe vboxdrv
sudo gpasswd -a $USER vboxusersvboxmanage list vms
vboxmanage list running vmspacman -S intel-dri xf86-video-intel nvidia bbswitch bumblebee lib32-nvidia-utils lib32-intel-dri
sudo gpasswd -a $USER bumblebee
sudo systemctl enable bumblebeed
sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="quiet"/GRUB_CMDLINE_LINUX_DEFAULT="quiet rcutree.rcu_idle_gp_delay=1"/' /etc/default/grubEdit /etc/bumblebee/xorg.conf.nvidia, set BusID "PCI:x:x:x", which should be the one shown for the Nvidia card in lspci.
To turn on Nvidia graphics card.
sudo tee /proc/acpi/bbswitch <<< ON
sudo modprobe nvidiaTo turn off Nvidia graphics card.
sudo modprobe -r nvidia
sudo tee /proc/acpi/bbswtich <<< OFFTest Bumblebee.
optirun glxgears -infossh-keygen -t rsa -b 4096 -C <user_email>
ssh-add ~/.ssh/id_rsa
sudo pacman -S xclip
xclip -sel clip < ~/.ssh/id_rsa.pubif got error "Could not open a connection to your authentication agent", try
eval `ssh-agent`
eval ssh-agent -sThen go ssh settings to add the ssh key.
Change https to ssh.
git remote show origin
git remote set-url origin git+ssh://[email protected]/USERNAME/REPONAME.gitReplace the USER with username and REPO with repository name
mkdir REPO && cd REPO
git init
echo init > README.md
git add .
git commit -m "init"
curl -u 'USER' https://api.github.com/user/repos -d '{"name":"REPO"}'
git remote add origin https://github.com/USER/REPO.git
# If prefer ssh to https, replace it with the following commad.
# git remote add origin [email protected]:USER/REPO.git
git push --set-upstream origin mastercurl -u USERNAME https://api.bitbucket.org/1.0/repositories --data name=REPO_NAME is_priviate='true'sudo npm install gitbook gitbook-cli -g
gitbook init
gitbook servesudo pacman -S sdcv
wget http://abloz.com/huzheng/stardict-dic/zh_TW/stardict-langdao-ec-big5-2.4.2.tar.bz2
wget http://abloz.com/huzheng/stardict-dic/zh_TW/stardict-langdao-ce-big5-2.4.2.tar.bz2
mkdir -p ~/.stardict/dic
tar -xvf stardict-langdao-ec-big5-2.4.2.tar.bz2 /usr/share/stardict/dic -C ~/.stardict/dic
tar -xvf stardict-langdao-ce-big5-2.4.2.tar.bz2 /usr/share/stardict/dic -C ~/.stardict/dic
sdcv -lpacman -S xorg-luit
luit -encoding big5 ssh [email protected]Note that I use chromium and cVim plugin, so you may not need Alt key in other case.
| Function | Key |
|---|---|
| Full screen | <alt> F |
| toggle play/pause | <alt> k |
| go forward | <alt> l |
| go back | <alt> j |
| move forward 1 frame | <alt> . |
| move backward 1 frame | <alt> , |
| increase speed | <alt> > |
| decrease speed | <alt> < |
Take screenshot and save to clipboard, of which the hotkey is + + .
gnome-screenshot -acLaunch a interactive window to take screenshot.
gnome-screenshot -aiUse xclip command to save the screenshot in command line.
xclip -se c -t image/png -o > THE_DESTENATIONyaourt -S zsh-syntax-highlighting
youart -S zsh-autosuggestions
echo source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh >> ~/.zshrc
echo source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh >> ~/.zshrclibreoffice --convert-to pdf FILE_NAME.pttls | grep -v FILE_NAME | xargs rmexport DISPLAY=":0.0"
xhost +
sudo gpartedOn the receiving end
nc -l -p PORT > OUTFILEOn the sending end
nc -w 3 DESTINATION PORT < FILE_TO_TRANSFERdd if=INFILE | pv | dd of=OUTFILEbackup pacman database
tar -cjf pacman_database.tar.bz2 /var/lib/pacman/local
tar -xjvf pacman_database.tar.bz2list native, explicitly installed packages
pacman -Qqen > pkglist.txtlist foreign, explicitly installed packages
pacman -Qemexclude the foreign packages(ex. AUR)
comm -12 <(pacman -Slq | sort) <(sort pkglist.txt)install packages from list
pacman -S - < pkglistfullly backup with rsync
sudo rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /run/media/circle/toshiba-linux/arch-linux-backup/Fri Aug 31 11:23:37 CST 2018
Remove a large file from git history
git filter-branch -f --index-filter "git rm -rf --cached --ignore-unmatch FOLDERNAME" -- --all
m -rf .git/refs/original/
git reflog expire --expire=now --all
git gc --prune=now
git gc --aggressive --prune=now
git push --all --force