Scientific progress goes "Boink"?

Linux in Anger

tl;dr : If you are an angry Windows alien using Linux, you will need these commands.

I assume it is just as frustrating for a Linux user to use Windows and vice versa. I am a Windows user who has to use Linux occasionally. I am no stranger to the command line. But there is so much stuff I just can’t remember, because I only need to use it once in a blue moon.

So, here is a list of command line tasks I wish I could remember.

Sudo Without Typing Password

sudo visudo

Add the following line at the end of the file:


Or edit /etc/sudoers

Mounting Windows Shares

sudo apt-get install cifs-utils
sudo mount -t cifs //server.local/myshare /mnt/myshare -o user=billgates,pass=password,rw,uid=$(id -u),gid=$(id -g),noserverino

Running a Live Ubuntu Distro

Installing packages can fail with an error “E: Unable to locate package”. Seems that the “universe” repository needs to be added:

sudo add-apt-repository universe

Install a .deb-File

sudo apt install ./name.deb

Create an Empty File, Make it Executable and Give it Root Access

chmod u+x
chmod 777

Don’t forget to start the file with “#!/bin/bash”.

List Harddisks


Lists all block devices.

Run a Script on Login

Edit the file .profile in your home directory. Add this line:

sh /home/billgates/

Install a Driver

sudo insmod driver.ko

Install a driver permanently:

Copy driver.ko to /lib/modules/$(uname -r)
sudo depmod -a
modprobe driver
Create /etc/modules-load.d/driver.conf containing one line with the driver name (here: "driver")

Find out Kernel Version

uname -r

Find out Linux Version

lsb_release -a

Save Passwords in Git

git config credential.helper store

Commit (and add) in Git

git commit -a -m "message"

Pull and overwrite local changes in Git

git fetch --all
git reset--hard origin/master


git reset --hard

Debian: Fix that apt requests CDROM media

Comment out the line which refers to the CDROM in /etc/apt/sources.list

sudo nano /etc/apt/sources.list

Debian: Install sudo

apt install sudo
usermod -aG sudo billgates

Note that you need to reboot the system.

Fedora: Installing Software

sudo dnf install nano

Quickly Start a Web Server

sudo python -m SimpleHTTPServer 80


fsarchiver: Partition imaging

Leave a comment