Skip to content

Instantly share code, notes, and snippets.

@byBretema
Created March 7, 2017 02:25
Show Gist options
  • Save byBretema/7c4a433e12fb910fc75d42d948ae0318 to your computer and use it in GitHub Desktop.
Save byBretema/7c4a433e12fb910fc75d42d948ae0318 to your computer and use it in GitHub Desktop.
[WIP] guide to config arch linux.
loadkeys es # Cambiamos el teclado a español.
efivar -l # Si esto devuelve algo, estamos corriendo bien sobre UEFI ;)
timedatectl set-ntp true # Habilita el cambio del horario de verano.
timedatectl set-timezone Europe/Madrid # Estable la hora de tu zona.
# Particiones a gusto del consumidor, via Ncurses.
cgdisk
# Damos formato a las particiones antes creadas, definiendo tambíen su LABEL.
mkswap -L AL_SWAP /dev/sdaW
mkfs.ext4 -L AL_VAR /dev/sdaX
mkfs.ext4 -L AL_ROOT /dev/sdaY
mkfs.ext4 -L AL_HOME /dev/sdaZ
# Lista las particiones, para una comprobación visual.
lsblk -x NAME -o NAME,SIZE,LABEL,PARTLABEL,MOUNTPOINT
# Empezamos a preparar el sistema.
swapon -L AL_SWAP
mount -L AL_ROOT /mnt
# Creamos las carpetas del sistema.
mkdir /mnt/var
mkdir /mnt/boot
mkdir /mnt/home
# Montamos las pariticiones anteriores en su carpeta correspondiente.
mount -L AL_VAR /mnt/var
mount -L AL_HOME /mnt/home
mount /dev/sdX /mnt/boot # X = Particion EFI creada por Windows.
# Paquetes basicos para el correcto funcionamiento.
pacstrap /mnt base base-devel # Puede tardar ....
# Guardamos el mapa de particiones en sys.
genfstab -L /mnt >> /mnt/etc/fstab
# Entramos al disco, salimos del booteable.
arch-chroot /mnt
# Define cual será el nombre del equipo.
echo "c0liseo" > /etc/hostname
# Ajustes de fecha y hora.
ln -s /usr/share/zoneinfo/Europe/Madrid /etc/localtime
hwclock --systohc --utc
# Puesta a punto del idioma, modificar según tu región.
vi /etc/locale.gen
locale-gen
echo "LANG=es_ES.UTF-8" >> /etc/locale.conf
echo "KEYMAP=es" > /etc/vconsole.conf
# Ajustes de internet para ethernet y wlan.
ip link # Hallar los nombres de las interfaces (Lo que va antes de '.service')
systemctl enable [email protected]
pacman -S iw wpa_supplicant # Para que funcione el wifi.
pacman -S dialog # Menu ncurses para el wifi.
pacman -S wpa_actiond # Permite la autoconexion a redes conocidas.
systemctl enable [email protected] # Activa la autoconexion.
# Puesta a punto de GRUB2
pacman -S grub
pacman -S os-prober
pacman -S efibootmgr
pacman -S intel-ucode # Sólo si tu procesador es intel.
grub-install \
--directory=/usr/lib/grub/x86_64-efi \
--target=x86_64-efi \
--efi-directory=/boot \
--bootloader-id=GRUUU \
--recheck
grub-mkconfig -o /boot/grub/grub.cfg
# Establecemos el password de root.
passwd
# Cerramos para reiniciar.
exit
umount -R /mnt # Opcional, pero elegante.
reboot # Quitar antes el pendrive.
# -----------------------------------------------
# Crea un usuario en 'wheel'
useradd -m -g users -G wheel cambalamas
passwd cambalamas
visudo # Descomentar la linea de " %wheel "
su cambalamas
# Antes de nada, wifi :D
sudo wifi-menu
# Priorizar el mirror de tu país...
sudo vim /etc/pacman.d/mirrorlist
# Añadir lo siguiente...
Server = http://sunsite.rediris.es/mirror/archlinux/$repo/os/$arch
Server = http://osl.ugr.es/archlinux/$repo/os/$arch
# Actualizar el systema...
sudo pacman -Syu
# AUR... ( yaourt )
sudo vim /etc/pacman.conf
# Añadir lo siguiente...
[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch
# Instalar yaourt y rsync...
sudo pacman -S yaourt rsync
# Paquetes Oficiales...
sudo pacman -S \
vim \ # Improved text editor.
git \ # Control de versiones.
nvidia \ # Controlador propietario.
bbswitch \ # Necesario para ' bumblebee '.
bumblebee \ # Para aprovechar Nvida Optimus. (Binomio con Intel Grapichs)
xorg \ # Servidor de pantalla.
dwm \ # Gestor de ventanas.
alsa-firmware # Controladores de audio.
alsa-utils \ # Gestor del audio del equipo.
bluez \ # Controladores de Bluetooth.
bluez-utils # Gestor del Bluetooth del equipo.
# Paquetes AUR...
yaourt -Sya
yaourt -S --noconfirm \
xbanish \ # Hace invisible el ratón mientras escribes.
msi-keyboard-git \ # Controla las luces de tu teclado.
# Configuraciones bluetooth
sudo modprobe btusb
sudo systemctl enable bluetooth.service
sudo systemctl start bluetooth.service
sudo hciconfig hci0 piscan
# Configuraciones tarjeta gráfica...
usermod -a -G bumblebee cambalamas
#systemctl enable bumblebeed.service
echo "setxkbmap -layout es &\nexec dwm" >> .xinitrc
# Configuraciones touchpad... ( Añadir lo siguiente al inicio de ~/.xinitrc )
xbanish &
syndaemon -i 1 -KRd &
synclient VertScrollDelta=-111
synclient HorzScrollDelta=-111
synclient HorizTwoFingerScroll=1
synclient TapButton1=1
synclient TapButton2=3
synclient TapButton3=2
synclient PalmDetect=1
synclient PalmMinWidth=5
# Configuraciones de teclado...
sudo msi-keyboard -m wave -c left,red,high -c middle,orange,high -c right,sky,high # Colores y movimiento.
# Configuración de comportamientos...
sudo vim /etc/systemd/logind.conf
# Añadir al final...
HandlePowerKey=lock
HandleLidSwitch=suspend
# Aplicaciones Oficiales...
sudo pacman -S \
chromium
# Aplicaciones AUR...
yaourt -S \
typora
# Comandos...
pacman -Qg | awk '!group[$1]++' # Para ver los grupos de los paquetes sin dups.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment