How we like our Ubuntu
January 13, 2019

How we like our Ubuntu

Personalize your Bash Experience

Increase the SUDO Password Timeout

$ sudo visudo

And add Defaults    timestamp_timeout=120 (or enter any number of minutes)

Set your ls Defaults

ls has some pretty defaults. I always end up typing ls -lha. Make life easier by editing ~/.bashrc. Find the section some more ls aliases and add yours.

A good practice to mitigate this is to open two shells before editing your .bashrc so that, if you break your login environment, you’re still logged into that other shell (.bashrc is only sourced on login, so that shell will be ‘normal’) and can likely fix or revert the damage from there. It’s a good idea to make a copy of your working .bashrc first before editing it.
- from "Editing your .bashrc" on harvard.edu

I also learned that you can set ls to colorize the output from this awesome article: How to Enable Colors for ls Command Output

This is what I currently alias "ls" to in ~/.bashrc:

alias ls='ls -lha --group-directories-first --color=auto'

Afterwards run source ~/.bashrc to implement your changes.

Utility Software

Midnight Commander

Make backspace go up a directory

Edit /etc/mc/mc.keymap and set/add the following: CdParentSmart = backspace

Default ~/.config/mc/panels.ini

Basically, we set the panel list mode user formats so that MC shows us the columns we want:

[New Left Panel]
display=listing
list_mode=user
user_format=half type name mtime | size:4 | perm | owner | group

[New Right Panel]
display=listing
list_mode=user
user_format=half type name mtime | size:4 | perm | owner | group

Show File Times in ISO Format

Edit ~/.config/mc/ini and add: timeformat_recent=%F %T

Secure MySQL

Set mysql.d to only accept connections from localhost in /etc/mysql/conf.d/my.cnf or mysqld.cnf or mariadb.cnf:

[mysqld]
bind-address = 127.0.0.1

Also disable 3306 in your firewall:

ufw deny 3306

How we like our Ubuntu
Share this