User Tools

Site Tools


tech:linux

Some Commands i Came across the i find useful. Just a placeholder maybe

Interface Priority on Linux

sudo nmcli connection modify 'enter ssid here' ipv4.route-metric 50

sudo nmcli connection up 'enter ssid here'

Install sudo command on Debian 12

su
apt install sudo

then add a user to sudo group

$ su -l
# adduser <your_username_here> sudo
# logout

Change IP Addressing from DHCP to Static

sudo nano /etc/network/interfaces

auto <interface>
iface <interface> inet static
address x.x.x.x
netmask 255.255.255.0
gateway xx.xx.xx
dns-nameservers xx.xx.xx


sudo systemctl restart networking.service

sudo systemctl status networking.service

Change the hostname on Debian 12 11 10 9

hostnamectl set-hostname {name-here}
sudo hostnamectl set-hostname enkielhostsample


nano /etc/hosts and Find all references to oldname and replace with newname

Check DNS (IF RESOLVECTL IS USED)

resolvectl status
resolvectl dns <interface> <dns address>,<dns address>

Remove Folder Contents

sudo rm -rf foldername/*

Missing disk space on new installation

lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv and then resize2fs /dev/ubuntu-vg/ubuntu-lv

Root file system requires manual fsck Error

you should be able to drop to some maintenance shell (if not already opened), where you may run fsck -yf /dev/sda1

Reading package lists... Error!

“Reading package lists… Error!”: This is a general error indicating that apt couldn't successfully read and parse the package lists.

sudo apt clean
sudo rm -rf /var/lib/apt/lists/*
sudo apt update
tech/linux.txt · Last modified: by enkiel

Page Tools