Skip to content

Instantly share code, notes, and snippets.

@meisinger
Created December 17, 2015 05:39
Show Gist options
  • Save meisinger/52754019d70db76b35e4 to your computer and use it in GitHub Desktop.
Save meisinger/52754019d70db76b35e4 to your computer and use it in GitHub Desktop.
arch linux stuff
#
# ~/.bashrc
#
export LANG=en_US.UTF-8
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto -F'
alias grep='grep --color=auto'
alias vi='vim'
alias mkdir='mkdir -p'
PS1='\r\n[\e[0;33m\]\u\e[0m\]@\e[0;32m\]\h\e[0m\]] \e[0;34m\]\w\e[0m\]\r\n$ '
" let's get real
set encoding=utf-8
set termencoding=latin1
set nocompatible
" prepare for plugins
filetype off
" set plugin path and begin
set rtp+=~/.vim/bundle/vundle.vim
call vundle#begin()
" install plugins
Plugin 'vundlevim/vundle.vim'
Plugin 'NLKNguyen/papercolor-theme'
Plugin 'bling/vim-airline'
Plugin 'kien/ctrlp.vim'
Plugin 'elixir-lang/vim-elixir'
" end plugin
call vundle#end()
" turn everything back on
filetype plugin indent on
syntax on
" use vim settings
set modelines=0
set t_Co=256
" timeouts
set timeoutlen=1000
set ttimeoutlen=0
" behavior
set hidden
set switchbuf=useopen
set history=1000
set undolevels=1000
set nobackup
set noswapfile
set wildmenu
set wildmode=list:full
set lazyredraw
set ttyfast
set visualbell
" basic settings
set showmode
set nowrap
set tabstop=2
set softtabstop=2
set expandtab
set backspace=indent,eol,start
set autoindent
set copyindent
set relativenumber
set number
set shiftwidth=2
set shiftround
set showmatch
set ruler
set mouse=a
" search settings
set ignorecase
set smartcase
set smarttab
set hlsearch
set incsearch
" format options
set formatoptions+=1
set scrolloff=3
" editor settings
set laststatus=2
set title
set showcmd
" colorscheme
set background=dark
colorscheme PaperColor
let g:ctrlp_custom_ignore = {
\ 'dir': 'node_modules\'
\ }
let g:airline#extensions#whitespace#enabled=0
let g:airline_theme='PaperColor'
" disable arrows
noremap <up> <nop>
noremap <down> <nop>
noremap <left> <nop>
noremap <right> <nop>
noremap ; :
" enable scroll
nnoremap j gj
nnoremap k gk
let mapleader="\<Space>"
nnoremap <Leader>l :bn!<CR>
nnoremap <Leader>h :bp!<CR>
nnoremap <Leader>/ :nohl<CR>
map <Leader>cd :cd %:p:h<CR>
map <Leader>s :source $MYVIMRC<CR>
map <Leader>e :e $MYVIMRC<CR>
XTerm*faceName: Bitstream Vera Serif Mono:size=11:antialias=false
xterm*faceSize: 11
xterm*vt100*geometry: 80x60
xterm*saveLines: 16384
xterm*loginShell: true
xterm*charClass: 33:48,35:48,37:48,43:48,45-47:48,64:48,95:48,126:48
xterm*termName: xterm-256color
xterm*eightBitInput: false
!BLK Cursor
#define _color0 #000d18
#define _color8 #000d18
!RED Tag
#define _color1 #e89393
#define _color9 #e89393
!GRN SpecialKey
#define _color2 #9ece9e
#define _color10 #9ece9e
!YEL Keyword
#define _color3 #f0dfaf
#define _color11 #f0dfaf
!BLU Number
#define _color4 #8cd0d3
#define _color12 #8cd0d3
!MAG Precondit
#define _color5 #c0bed1
#define _color13 #c0bed1
!CYN Float
#define _color6 #dfaf8f
#define _color14 #dfaf8f
!WHT Search
#define _color7 #efefef
#define _color15 #efefef
!FMT Include, StatusLine, ErrorMsg
#define _colorBD #ffcfaf
#define _colorUL #ccdc90
#define _colorIT #80d4aa
!TXT Normal, Normal, Cursor
#define _foreground #dcdccc
#define _background #1f1f1f
#define _cursorColor #8faf9f
XTerm*color0 : _color0
XTerm*color1 : _color1
XTerm*color2 : _color2
XTerm*color3 : _color3
XTerm*color4 : _color4
XTerm*color5 : _color5
XTerm*color6 : _color6
XTerm*color7 : _color7
XTerm*color8 : _color8
XTerm*color9 : _color9
XTerm*color10 : _color10
XTerm*color11 : _color11
XTerm*color12 : _color12
XTerm*color13 : _color13
XTerm*color14 : _color14
XTerm*color15 : _color15
XTerm*colorBD : _colorBD
XTerm*colorIT : _colorIT
XTerm*colorUL : _colorUL
XTerm*foreground : _foreground
XTerm*background : _background
XTerm*cursorColor : _cursorColor
arch-linux install
from iso (thumb drive, boot usb)
NETWORK
ping -c 2 [some uri]
check if connectivity exists
ip link
check if network available
ip link set up [net interface]
ability to set network interface "up"
only if one is not active
wifi-menu [net interface]
possible wifi setup (untested)
HARD DRIVE
lsblk
shows available hard drives
cfdisk /dev/[drive]
format or partition hard drive
make a root
make a home
make a swap [optional]
write the changes
lsblk /dev/[drive]
shows partitions for the drive
mkfs.ext4 /dev/[partition]
formats the partition to ext4 format
MOUNT PARTITIONS
mkswap /dev/[swap partition]
marks the partition as a swap partition
clearly this is only done if a swap was created
swapon /dev/[swap partition]
mounts the swap partition as a swap
clearly this is only done if a swap was created
mount /dev/[root partition] /mnt
mounts the root partition under "/mnt"
mkdir -p /mnt/home
creates the home directory
mount /dev/[home partition] /mnt/home
mounts the home partition under "/mnt/home"
SETUP MIRROR (PACMAN)
vi /etc/pacman.d/mirrorlist
INSTALL BASE TO ROOT
pacstrap -i /mnt base base-devel
bootstrap pacman to install the base packages
and development packages to the root (or "/mnt")
GENERATE FILE SYSTEM
genfstab -U -p /mnt >> /mnt/etc/fstab
generates the file system table file using UUIDs
cat /mnt/etc/fstab
review the results
BASH IT UP
arch-chroot /mnt /bin/bash
SETUP LOCALE
vi /etc/locale.gen
select the locale (uncomment choice)
locale-gen
generates the locale (can generate multiple)
export LANG=[generated locale]
sets the locale
echo [locale] > /etc/locale
SETUP TIMEZONE
ls -l /usr/share/zoneinfo
list the available time zones
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
link the desired time zone to local time
export TZ=America/New_York
SETUP HARDWARE CLOCK
hwclock --systohc --utc
sets the hardware clock to UTC
SETUP HOST NAME
echo [name] > /etc/hostname
write the hostname file
vi /etc/hosts
add the name to the end of each entry
resolve the loopback entries
CONFIGURE NETWORK (DHCP)
ip link
view the available interfaces
systemctl enable dhcpcd@[interface].service
ensures the available interface is up upon boot
CONFIGURE NETWORK (WIFI)
pacman -S dialog
install dialog (support for wifi-menu)
pacman -S iw wpa_supplicant
install wifi-menu
helps with setup if wireless card available
pacman -S wpa_actiond
install auto connect to known networks (wifi)
systemctl enable netctl-auto@[interface].service
ensures auto connect upon boot
SETUP PASSWORD
passwd
duh
SETUP BOOTLOADER
pacman -S syslinux
install syslinux bootloader
clearly other bootloaders can be installed (pref)
pacman -S gptfdisk
required for syslinux
may not work if dual boot with windows legacy
syslinux-install_update -i -a -m
sets up the boot sector automatically
vi /boot/syslinux/syslinux.cfg
configure syslinux
update "arch" label to point to "root" partition
exit
reboot
[login as root]
ADD USER (YOU, NOT ROOT)
useradd -m -G [groupname] -s /bin/bash [username]
passwd [username]
BYPASS SUDO (OPTIONAL)
vi /etc/sudoers
enter username to "sudo" list
[username] ALL=(ALL) ALL
[groupname] ALL=(ALL) ALL
=> if file is readonly ::-> w!
exit
[login as you]
-- DONE
SETUP PACMAN REPOS
sudo vi /etc/pacman.conf
add repository ::->
[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch
[infinality-bundle]
SigLevel = Never
Server = http://bohoomil.com/repo/$arch
[infinality-bundle-multilib]
SigLevel = Never
Server = http://bohoomil.com/repo/multilib/$arch
[infinality-bundle-fonts]
SigLevel = Never
Server = http://bohoomil.com/repo/fonts
<-::
sudo pacman -Syu
sync the package repositories
SETUP INFINALITY
sudo pacman -S infinality-bundle
sudo pacman -S infinality-bundle-multilib
sudo pacman -S infinality-bundle-fonts
SETUP XORG
sudo pacman -S xorg
sudo pacman -S xorg-xinit
sudo pacman -S xterm xorg-twm
SETUP VIRTUALBOX GUEST ADDITIONS
pacman -S virtualbox-guest-utils
pacman -S virtualbox-guest-modules
pacman -S virtualbox-guest-dkms
will require headers to be installed
dkms install VirtualBox/[Version]
rebuild the kernel
do not setup dkms as a service (breaks pacman)
vi /etc/modules-load.d/virtualbox.conf
add the following services ::->
vboxguest
vboxsf
vboxvideo
<-::
SETUP BASHRC
vi ~/.bashrc
-- use example file --
SETUP XRESOURCES
vi ~/.Xresources
-- use example file --
SETUP i3
sudo pacman -S i3 i3blocks dmenu
update config ::->
exec --no-startup-id test -f ~/.Xresources && xrdb -merge ~/.Xresources
font pango:Bitstream Vera Serif Mono 11
new_window none
status_command i3blocks -c ~/.config/i3/i3blocks.conf
<-::
SETUP FEH
sudo pacman -S feh
SETUP XINIT
vi ~/.xinitrc
add sessions ::->
/usr/bin/VBoxClient-all
feh --bg-max ~/.images/linux_arch_1366x768.jpg
exec i3
<-::
START XORG
startx
SETUP YAOURT
sudo pacman -S yaourt
install yaourt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment