LINUXOPOLIS #8 • Linux From Scratch (LFS)

in #linux7 years ago

LINUXOPOLIS
A short summary of building a personal Linux "habitat".
Published with SteemPeak

ScreenshotScreenshot by Willi Glenz

UPDATE #8

017 LINUX-FROM-SCRATCH (LFS)
• Homepage          : linuxfromscratch.org/lfs/index.html
• Download          : linuxfromscratch.org/lfs/downloads/stable/
• Online-Book       : linuxfromscratch.org/lfs/view/stable/
• DistroWatch       : distrowatch.com/table.php?distribution=lfs

PROJECTS
• Linux From Scratch            : linuxfromscratch.org/lfs/
• Beyond Linux From Scratch     : linuxfromscratch.org/blfs/
• Automated Linux From Scratch  : linuxfromscratch.org/alfs/
• Cross Linux From Scratch      : trac.clfs.org/

STEPS
03 Virtualbox       : # apt install virtualbox
02 Debian Live-CD   : cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/
01 RTFM             : linuxfromscratch.org/lfs/view/stable/


016 TOOLBOX
# apt install ...
A - alacarte atop aview
B - backintime-qt4 bluefish boostnote
C - calcurse clipit cherrytree cmus
E - espeak 
F - firmware-iwlwifi firmware-realtek focuswriter fzf
G - gdebi gkrellm glances gnome-clocks gnome-do gparted grsync guake 
H - htop hwinfo 
I - inxi i3-wm
K - kismet  
L - libreoffice links lsd lvm2  
M - mc menulibre 
N - netcat net-tools nmap
P - powertop printer-driver-cups 
R - ranger
S - screen sudo syncthing
T - taskwarrior terminator timeshift timewarrior tripwire 
V - veracrypt* vim virtualbox vym 
W - w3m
Y - youtube-dl
015 EDITOR
# apt install vim ctags vim-doc vim-scripts
# update-alternatives --config editor
$ vim ~/.bashrc
> EDITOR=/usr/bin/vim
> VISUAL=$EDITOR
> export EDITOR VISUAL
014 BASHRC
$ vim ~/.bashrc
> HISTCONTROL=ignoreboth:erasedups
> alias h='clear; echo; history 30; echo'
> set -o vi
> bind -m vi-insert "\C-l":clear-screen
> EDITOR=/usr/bin/vim
> VISUAL=$EDITOR
> export EDITOR VISUAL
013 VIM
:call matchadd('colorColumn', '\%81v', 100)
012 FUZZI FINDER
$ fzf -e --preview 'head -100 {}'
011 CRYPTOCURRENCIES
$ curl rate.sx
$ curl rate.sx/btc@3d
$ curl rate.sx/steem@3d
010 /ETC/FSTAB
# blkid
# vim /etc/fstab
> #RAMDISK
> none /media/ramdisk tmpfs nodev,nosuid,noexec,nodiratime,size=1024M 0 0
009 USEFUL SHORTCUTS & COMMANDS
<ctrl>+z fg jobs <ctrl>+u <ctrl>+k <ctrl>+w <alt>+. <bash-vim-mode>
008 ALIASES
$ vim ~/.bashrc
> a='clear; echo; alias; echo'
> b='buku'
> c='clear; echo'
> cc='clear; ncal -3wy'
> cdh='\cd; clear; echo; lsd -l; echo'
> cdd='clear; \cd ~/Dropbox; echo; lsd -l; echo'
> cdp='clear; \cd ~/.phoenix; echo; lsd -l; echo'
> e='clear; cd ~/Apps; ./eclipse &'
> g='clear; glances'
> l='clear; echo; lsd -l; echo'
> ls='clear; echo; lsd -l; echo'
> p='(clear; \cd ~/.phoenix; java -jar phoenix.jar)'
> u='clear; sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade; sudo apt-get autoremove -y'
> h='clear; history 30'
> ra='clear; \cd ~/Dropbox; ranger'
> rs='clear; rsync -avzP --delete --stats --exclude-from "/home/user/.exclude.txt"  /home/user/ /media/disk/'
> s='clear; curl rate.sx/steem@1d; gnome-screenshot -ac'
> t='clear; task; timew week; timew summary'
> tt='clear; task burndown.daily'
> ttt='clear; task calendar 2019'
> tw='timew'
> tm='clear; timew month'
> py='clear; python3'
007 RAM-DISK PERMANENT
# mkdir -p /media/ramdisk
# vim /etc/fstab
> none /media/ramdisk tmpfs nodev,nosuid,noexec,nodiratime,size=1024M 0 0
# mount -a
$ mount | column -t
006 RAM-DISK TEMPORARY
# mkdir -p /media/ramdisk 
$ mount | column -t
# mount -t tmpfs -o size=1024M tmpfs /media/ramdisk
# mount -a
$ mount | column -t
005 SOURCES.LIST FOR DEBIAN-STRETCH
• # vim /etc/apt/sources.list

• # Security updates
• deb http://security.debian.org/debian-security stretch/updates main contrib non-free
• deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free

• # Base repository
• deb http://ftp.de.debian.org/debian/ stretch main contrib non-free
• deb-src http://ftp.de.debian.org/debian/ stretch main contrib non-free

• # Stable updates
• deb http://ftp.de.debian.org/debian/ stretch-updates main contrib non-free
• deb-src http://ftp.de.debian.org/debian/ stretch-updates main contrib non-free

• # Stable backports
• deb http://ftp.debian.org/debian stretch-backports main contrib non-free
• deb-src http://ftp.debian.org/debian stretch-backports main contrib non-free

• # Virtualbox
• deb https://download.virtualbox.org/virtualbox/debian stretch contrib
004 SYSTEM UPDATE AND UPGRADE
alias u='clear; sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade; sudo apt-get autoremove -y'
003 TWEAK TOOL FOR GNOME
# apt install dconf-editor && apt show dconf-editor
/org/gnome/terminal/legacy/default-show-menubar
002 TWEAK TOOL FOR GNOME
# apt install gnome-tweak-tool && apt show gnome-tweak-tool
Typing-Tab > Caps Lock key behaviour > Make Caps Lock an additional ESC|
001 VIM-MODE in BASH
$ vim ~/.bashrc
• set -o vi
• bind -m vi-insert "\C-l":clear-screen