User Tools

Site Tools


helpful_ubuntu_commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
helpful_ubuntu_commands [2024/12/26 09:02] – [Helpful Ubuntu/Linux Commands and Procedures] mikehelpful_ubuntu_commands [2025/06/14 06:35] (current) mike
Line 1: Line 1:
 ====== Helpful Ubuntu/Linux Commands and Procedures ====== ====== Helpful Ubuntu/Linux Commands and Procedures ======
 ---- ----
 +=== Disable Ubuntu Pro "Ads", Etc. ===
 +<color red>First implemented in my network 03/20/2025; monitoring for effectiveness</color>
 +  sudo pro config set apt_news=false
 +
 === List hard drive serial numbers === === List hard drive serial numbers ===
   lsblk --nodeps -o name,serial   lsblk --nodeps -o name,serial
Line 6: Line 10:
 === List processes and the ports they are listening on === === List processes and the ports they are listening on ===
   netstat -tulpn | grep LISTEN   netstat -tulpn | grep LISTEN
 +or
 +  ss -tulpn | grep LISTEN
      
 === Reload systemd manager configuration after changes made === === Reload systemd manager configuration after changes made ===
Line 50: Line 56:
  
 === Solution for Linux systems not visible in the "Network Neighborhood" on Windows machines === === Solution for Linux systems not visible in the "Network Neighborhood" on Windows machines ===
-  apachectl install wsdd+  apt install wsdd
      
 === View video resolution capabilities === === View video resolution capabilities ===
Line 58: Line 64:
 OTA DVR recordings are saved as **.ts** files, which are not compatible with DaVinci Resolve (my video editor of choice).  For this reason, we must convert the files into a format that “DR” can comprehend.  We can do this on linux using the ffmpeg package: OTA DVR recordings are saved as **.ts** files, which are not compatible with DaVinci Resolve (my video editor of choice).  For this reason, we must convert the files into a format that “DR” can comprehend.  We can do this on linux using the ffmpeg package:
   ffmpeg -i <inputfile.ts> -vcodec copy -acodec copy <outputfile.mp4>   ffmpeg -i <inputfile.ts> -vcodec copy -acodec copy <outputfile.mp4>
 +  
 +=== Generate password hashes (useful for Ansible playbooks amongst other things) ===
 +  mkpasswd --method=sha-512
 ==== Cookbook for passing client IP address to systems behind a reverse proxy ==== ==== Cookbook for passing client IP address to systems behind a reverse proxy ====
 === On the reverse proxy: === === On the reverse proxy: ===
Line 74: Line 83:
  
 Restart apache. Restart apache.
 +
 +=== Create new GPT disk partition ===
 +sudo into an elevated shell and then perform the following:
 +  parted /dev/sdX (where X is the letter of the drive to be manipulated)
 +  mklabel gpt
 +  Acknowledge the warning if one is given
 +  unit TB
 +  mkpart primary 0.00TB 2.00TB (or 3.00TB, 4.00TB, etc. depending on the size to be created)
 +  print (to view the new partition)
 +  quit (to exit parted)
 +
 +Then proceed to format the new drive, i.e. **mkfs -t ext4 /dev/sdb1**
 +
 +==== Changing the server's IP address ====
 +  sudo vi /etc/netplan/00-installer-config.yaml
 +  find the existing IP and change it to the desired IP; 'wq' out of the file
 +  sudo netplan apply
 +  
 +==== Changing the server's host name ====
 +  hostnamectl set-hostname [new host name]
 +  
  
helpful_ubuntu_commands.1735232566.txt.gz · Last modified: by mike

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki