All the use of sudo
down here might be making you nervous, but in an ideal Ubuntu setup, you'll make an admin user that isn't root. So this isn't so bad. See this Digital Ocean guide on making a super user when you first light up your Ubuntu instance.
sudo apt-get upgrade
(gets system updates)sudo apt-get dist-upgrade
(upgrades you to a new version of ubuntu)sudo apt-get update
(installs system updates)sudo apt autoremove
(cleans up all the old update packages)sudo apt-get program-name-here
(if the program has a binary build, you get it via this command)sudo add-apt-repository ppa:webupd8team/sublime-text-2;
(gets you sublime text but any repo could be put here after the ppa: part)sudo apt-get update;
(run update again)sudo apt-get install sublime-text
(installs sublime)sudo apt-get install xsel
(helps get you pbcopy on ubuntu)alias pbcopy='xsel --clipboard --input'
(gets you pbcopy)alias pbpaste='xsel --clipboard --output'
(gets you pbpaste)sudo whereis your-filename-here
(tells you where a certain file is, but it really doesnt work)sudo /usr/share/webmin/changepass.pl /etc/webmin root new-password
(changes your webmin password, which is similar to an act of god)sudo a2enmod rewrite
(sets up rewrite_mod for Apache2 - this powers pretty URLs in many CMSs)/Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
(path for virtual box guest additions if you are running an Ubuntu dev machine from OSX)CNTL+H in file browser
(shows hidden files in Ubuntu)sudo ufw allow 80/tcp
(adds typical port 80 to allowable ports list on ufw, which is ubuntu firewall)sudo ufw show added
(shows which ports you have allowed on ufw)sudo ufw enable
(enables ufw)sudo fallocate -l 4G /swapfile
(creates 4G swapfile)sudo chmod 600 /swapfile
(puts proper permissions on the swapfile directory so the world cant see it)sudo mkswap /swapfile
(format the folder for swap usage)sudo swapon /swapfile
(enable swapfile)sudo sh -c 'echo "/swapfile none swap sw 0 0" >> /etc/fstab'
(makes ubuntu server automatically load it's swap file on restart)sensors
(gives you readout on CPU core temps)lscpu
(details on CPU hardware and frequency utilization)sudo hddtemp /dev/sda /dev/sdb /whatever/your/drive/name/is
(gives you temperature info on HDDs)lsusb
(tells you which devices are connected to your linux install)sudo lshw -short
(gives you read out of all your hardware)
Using Handbrake
-
Find out where you DVD drive is on your server
sudo lshw -short
-
Locate the drive for
lshw
command and find the 'device' path, should be something like:/dev/cdrom
-
Manually, make a mount point for the drive on your system (should probably be at root)
sudo mkdir /mounted/cdrom
-
Mount drive to mount point
sudo mount -t auto /dev/cdrom /mounted/cdrom
-
Install HandBrake repo
sudo add-apt-repository ppa:stebbins/handbrake-releases
sudo apt-get update
-
Install HandBrakeCLI
sudo apt install handbrake-cli
-
Most DVDs are locked, libdvdcss decodes them
sudo apt install libdvd-pkg && sudo dpkg-reconfigure libdvd-pkg
-
Uses HandbrakeCLI to rip movie (-i path/to/mounted/dvd, -o output/destination, -e video-encoding-format, -q quality, -b audio-bit-rate-aac)
HandBrakeCLI -i /mounted/cdrom/VIDEO_TS -o /media/video/your_movie_here.mp4 -e x264 -q 22 -B 160