llog - learning linux log
Static website built with mkdocs.org .
- Re-create creating a new Debian 12 kvm virtual machine
- Provisioning a new debian based distro
- create an admin user called tux
- use vmware12 for passwords on tux and root
- create ~/bin and add path to .bashrc
- activate .bash_aliases by creating a few entries.
# ifconfig
#alias lports=' netstat -taupen'
# ip a
alias lports=' ss -taupen'
alias od=' od -A x -t x1z -v'
alias lr=' ls -latr'
- create .funcs add the following new functions
whdr() {
echo '<!DOCTYPE html><head><title>bash2web</title></head><body><pre>'
}
wftr() {
echo '</pre></body></html>'
}
today() {
date +%Y%m%d
}
sftp
Goal: how to move data from the jeremy server to your freeshell account.
HEREDOC
- generate the upit script
- login as root (id 0)
apt update; apt upgrade
apt install vim
mkdir /root/bin
echo export PATH="$PATH:$HOME/bin"' >> ~/.bashrc
cat > upit <<UPITALL
#!/bin/bash
# /root/bin/upit
apt-get check
apt-get update
apt-get -y upgrade
apt-get -y dist-upgrade
apt clean
apt -y autoclean
apt remove
apt -y autoremove --purge
cat /etc/os-release
cat /proc/version
lsb_release
sync
# to fix repos
#dpkg --configure -a
#apt-get -f install
#--
UPITALL
LVM lab review
Watch the video on canvas as a few steps are occluded here
fdisk /dev/sdb
fdisk /dev/sdc
fdisk /dev/sdd
pvcreate /dev/sdb1 /dev/sdc1 /dev/sdd1
pvs
pvdisplay
vgcreate deb10lvm /dev/sdb1 /dev/sdc1 /dev/sdd1
vgs
vgdisplay
vgscan
lvcreate --name lvone --size 1G deb10lvm
lvcreate --name lvtow --size 1G deb10lvm
lvcreate --name lvthree --size 1G deb10lvm
lvcreate --name lvfour --size 1G deb10lvm
lvs
lvdisplay
mkfs.ext4 /dev/deb10lvm/lvone
mkfs.ext4 /dev/deb10lvm/lvtow
mkfs.ext4 /dev/deb10lvm/lvthree
mkfs.ext4 /dev/deb10lvm/lvfour
cd mnt
mkdir lv1 lv2 lv3 lv4
mount /dev/deb10lvm/lvone /mnt/lv1
mount /dev/deb10lvm/lvtow /mnt/lv2
mount /dev/deb10lvm/lvthree /mnt/lv3
mount /dev/deb10lvm/lvfour /mnt/lv4
vi /etc/fstab
small distro
Goal: find a nice small distro you can use for repair
add linux to any of the below in your search engine.
- absolute
- alpine
- rancheros
- silverblue (used as Docker Servers)
- tinycore
- antix lubuntu lxle boidhi bunsenlabs sparky
- slitaz
- porteus
- ttylinux (stale)
- puppy debiandog
- peppermint
- linux lite
Add users script
Goal: how to automate installing 10 users (user01 - user10)
Final Project
Goal: Do all again -
- add a LAMP stack and change the default webpage
Final exam - Yes, but ..
AWS Lab
Goal: Exposure to a skill to pay a bill.
- Feel free to do the Final Project on AWS
AWS Lab