Linux comm's
Commands/Directions
TECH
3/13/20253 min read
CLEAN-
sudo apt autoremove left over dependencies
sudo apt autoclean removes outadeated packages
sudo apt clean --dry-run shows what would be removed, then
sudo apt clean clean package cache
sudo apt purge … uninstalls app and associated packages
sudo apt autoremove
sudo apt autoclean
sudo apt clean --dry-run
sudo apt clean
sudo update-desktop-database update app database for viewing
Example-
sudo apt purge vlc
sudo apt autoremove
rm -rf ~/.config/vlc
sudo apt clean
To confirm VLC is gone: which vlc
RESTART-
sudo systemctl daemon-reload
sudo systemctl restart smbd
sudo systemctl restart smbd
sudo systemctl restart nmbd
EDIT-
sudo nano /etc/fstab just look= sudo cat /etc/fstab
ex/
UUID=01D6808E93ED92A0 /media/HOMEserver auto defaults,nofail,x-systemd.automount 0 2
UUID=F6CB-FA82 /media/jesse/Smallz auto defaults,nofail,x-systemd.automount 0 2
Or NO auto = UUID=F6CB-FA82 /media/jesse/Smallz exfat noauto,uid=1000,gid=1000,umask=000 0 0
-this works but not auto
Sharing Samba
sudo cat /etc/samba/smb.conf - just look
sudo nano /etc/samba/smb.conf - edit
[SHARE]
path = /home/jesse/Documents/SHARE
writeable = yes
create mask = 0777
directory mask = 0777
public = no
LIST DEVICE-
lsblk - Lists all block devices (drives, partitions) and their mount points.
blkid - Identifies devices by unique IDs and types
sudo blkid & lsblk
sudo fstab -l or fstab -l
hostname -I
INSTALL-
Samba - sudo apt install samba smbclient cifs-utils
sudo apt install avahi-daemon
sudo apt install wsdd
sudo apt-get install ntfs-3g
sudo apt install gdebi
sudo apt install pcmanfm
Flatpak-
sudo apt install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Firefox-
sudo snap remove firefox
sudo snap remove --purge firefox
sudo snap disable firefox
sudo apt purge firefox
flatpak uninstall org.mozilla.firefox
VPN-
sudo ufw status & reload ,
‘ufw’ is VPN command - sudo ufw allow Samba
Synaptics-
sudo apt install ./Downloads/synaptics-repository-keyring.deb
Ext HDD mount- (permanent)
sudo apt install exfat-fuse
findmnt
sudo mount -t ntfs /dev/sda1 /media/jesse/
Manual Mount- sudo mount /media/jesse/Smallz
OR
./mount_smallz.sh
DLNAserver-
sudo systemctl status minidlna
sudo systemctl restart minidlna - if reload doesn't work use restart Reload vs Restart
sudo systemctl reload minidlna - rescan server to update DLNA / upon update reload no longer works
sudo systemctl start minidlna
sudo systemctl stop minidlna
FFmpeg- convert instructions
# Batch Convert MP4 to MKV for Roku
# Location: /home/jesse/Videos/FFmpeg/
# Output: /home/jesse/Videos/FFmpeg/converted/
# Purpose: Fast, same-size conversion, Roku-playable
1. Open terminal (Ctrl + Alt + T)
2. cd /home/jesse/Videos/FFmpeg/
3. for f in .mp4; do [ -f "converted/${f%.}.mkv" ] && echo "Skipping $f - already exists" || ffmpeg -i "$f" -c:v copy -c:a copy "converted/${f%.*}.mkv"; done
4. (Optional) ls -lh converted/ # Check sizes
5. Copy converted/*.mkv to Roku via DLNA and test playback
Ext Monitor-
sudo ./displaylink-driver-version.run
displaylink -l
sudo apt install displaylink-driver
sudo apt install ./Downloads/displaylink-drivers-6.1.0-17.run
sudo apt install displaylink-driver
File Manager-
Nautilus - default Ubuntu/Linux
PCManFM - dual window / preferred for file transfer, maybe sudo issue with certain folder copy.
CyberPower UPS-
sudo pwrstat -config -status
TimeShift-
sudo apt remove timeshift
Sudo apt purge timeshift
Smb.conf - for shared drives/folders, listed at bottom of Global section
[HOMEserver]
path = /media/HOMEserver/HOMEserver.8t
writeable=Yes
create mask=0777
directory mask=0777
public=no
[Smallz]
path = /media/jesse/Smallz
writeable=Yes
create mask=0777
directory mask=0777
public=no
[SHARE]
path = /home/jesse/Documents/SHARE
writeable = yes
create mask = 0777
directory mask = 0777
public = no
[DLNAserver]
path = /home/jesse/Videos/DLNAserver
read only = no
writable = yes
browsable = yes
guest ok = yes
=========================================================Maybe dont need this—-
Desktop (New: jesse@jessew22:~)(Old: jessew22@desktop-tx1:~)
jesse@jessew22:~$ sudo IP: 238
Newpass1
Router:
TP-Link - 192.168.1.1
sudo mount -t ntfs /dev/sda1 /media/jesse/ for fulltime mounting
TimeShift / Bleachbit
Extension GSConnect (46,57) for remote access
Wifi before using change DNS to Chrome/20ThingsUbuntu to do for info
Firefox settings from white paper
Pwrstat config CyberPower
Synaptic Package for non-Snap/Flatpak like for .deb i think
Firewall - gufw (install?) check GUFW
sudo mount -t ntfs /dev/sda1 /media/jesse/ for fulltime mounting
sudo nano /etc/fstab assign UUID to file path HOMEserver & Smallz
sudo nano /etc/samba/smb.conf Create Samba “NAS” with permissions at bottom of conf
[HOMEserver]
path = /media/jesse/HOMEserver
writeable=Yes
create mask=0777
directory mask=0777
public=no
[Smallz]
path = /media/jesse/Smallz
writeable=Yes
create mask=0777
directory mask=0777 use 775 or 0775?
public=no
sudo systemctl restart smbd
sudo systemctl daemon-reload
========================================
[HOMEserver]
path = /media/HOMEserver/HOMEserver.8t
writeable=Yes
create mask=0777
directory mask=0777
public=no
[Smallz]
path = /media/jesse/Smallz
writeable=Yes
create mask=0777
directory mask=0777
public=no
[SHARE]
path = /home/jesse/Documents/SHARE
writeable = yes
create mask = 0777
directory mask = 0777
public = no
[DLNAserver]
path = /home/jesse/Videos/DLNAserver
read only = no
writable = yes
browsable = yes
guest ok = yes
========================================