--- type: "topic" created: "2024-01-29T05:19:01.392Z" updated: "2024-04-15T16:14:53.254Z" --- # Ubuntu - [Barcode Host](../.kanbn/tasks/barcode-host.md) ```bash lsb_release -a sudo -l timedatectl set-timezone America/Phoenix find / -name "secrets.json" 2>/dev/null ls -1 | wc -l cp -R -u -p /source /destination ``` ```bash cd /home # directory percent tree ncdu ``` ```bash adduser syncthing ``` ```bash # Free space df -h --total vgdisplay lvdisplay lsblk ``` ```bash # mount mount /dev/sda4 /mnt umount /dev/sda4 # mount -o remount,uid=1000,gid=1000,rw /dev/sda4 # mount -t ntfs -o nls=utf8,umask=0222 /dev/sda4 /mnt # mount -t ntfs -o ro /dev/sda4 /mnt # mkdir /home/mike/1-Images-A # mount --bind /mnt/1-Images-A /home/mike/1-Images-A # mount -o remount,rw /home/mike/1-Images-A # umount /home/mike/1-Images-A # rm -R /home/mike/1-Images-A mkfs -t ext4 /dev/sda4 mount /dev/sda4 /mnt blkid ``` ```conf /dev/sda4: UUID="27753635-40b1-4f21-8f6c-28b1c1997cfb" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Basic data partition" PARTUUID="b920a38c-4682-4c16-9abd-a385fd57b29d" ``` ```bash # https://askubuntu.com/questions/45607/how-to-mount-partition-permanently nano /etc/fstab ``` ```conf /dev/disk/by-uuid/27753635-40b1-4f21-8f6c-28b1c1997cfb /mnt ext4 defaults 0 2 ``` ```bash fdisk -l lvdisplay lvm lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv esize2fs -p /dev/mapper/ubuntu--vg-ubuntu--lv ``` ```bash apt-get install lshw lshw -class disk -class storage lshw -html > /var/www/html/my-specs.html nano /var/www/html/my-specs.html apt-get install smartmontools smartctl -i /dev/sda apt-get install hdparm hdparm -I /dev/sda ``` ```yaml Device Model: 256GB SSD Serial Number: CM42ABH1005410 LU WWN Device Id: 5 3a5a27 0100c22ca Firmware Version: SN11842 User Capacity: 256,060,514,304 bytes [256 GB] Sector Size: 512 bytes logical/physical Rotation Rate: Solid State Device Form Factor: M.2 TRIM Command: Available, deterministic, zeroed Device is: Not in smartctl database 7.3/5319 ATA Version is: ACS-4 (minor revision not indicated) SATA Version is: SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Mon Feb 26 16:48:42 2024 MST SMART support is: Available - device has SMART capability. SMART support is: Enabled ``` ```bash # https://stackoverflow.com/questions/338037/how-to-check-permissions-of-a-specific-directory ls -la namei -l getfacl stat -c "%n %a" ``` ```bash # https://www.cyberciti.biz/faq/how-to-use-sed-to-find-and-replace-text-in-files-in-linux-unix-shell/ sed -i 's/net8.0/net6.0/g' Shared/OI.Metrology.Shared.csproj ``` ```bash # all users compgen -u # all groups compgen -g usermod -a -G docker mike groups list mike ``` ```bash # https://stackoverflow.com/questions/49249375/how-to-disable-cloud-init-networking /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg ``` ```yaml network: {config: disabled} ``` ```bash # https://intercom.help/privatevpn/en/articles/6440374-how-to-disable-ipv6-on-ubuntu-and-fedora-linux nano /etc/sysctl.conf ``` ```conf net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 ``` ```bash sysctl -p cat /proc/sys/net/ipv6/conf/all/disable_ipv6 ``` ```bash # https://www.omgubuntu.co.uk/2021/07/enable-minimize-click-ubuntu-dock gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize' ``` ```bash # View package virtual IP per Peter Kim mviewcl ```