The Linux tips thread

My employer gave me a Dell XPS laptop with Ubuntu pre-installed; It's been ages since I've used Linux as a desktop, this is a thread where I intend to share various tips which might be useful. Anyone else is of course welcome to contribute :)

Please don't turn this in a 'Linux-sucks-because-$foo-thread'. ;) This is already common knowledge :D
 
This has been a long-time annoyance: GNU ls doesn't know how to sort.

On BSD:
Code:
[~/ls-sort]% ls
#test    1 file   10 file  World    _under   hello

While with GNU ls:
Code:
[~/ls-sort]% /bin/ls
10 file  1 file  hello  #test  _under  World

Apparently, GNU ls uses the locale to make sorting 'smarter' (this is not mentioned anywhere in the manpage). To restore the normal sane behaviour:

Code:
[~/ls-sort]% env LANG=C ls
#test  1 file  10 file  World  _under  hello

you can make this in an alias:
Code:
alias ls 'env LANG=C ls'

(Shell examples assume tcsh)
 
Ubuntu/Debian has a bsdtar package, which includes tar & libarchive from FreeBSD; This is useful not just because some flags/options are subtly different, but also because bsdtar works with many different archive formats (zip, rar, 7-zip, ISO images, etc.).
 
Provide roughly the same output as sockstat(1):

Code:
alias sockstat "netstat -lnptu --protocol=inet,unix"

(There is also a sockstat package, by the way. It's almost never installed by default, though).
 
To prevent the output of manpages spreading across your entire terminal width (not a good thing, IMHO), use the MANWIDTH environment variable:

Code:
setenv MANWIDTH 80
 
Carpetsmoker said:
My employer gave me a Dell XPS laptop with Ubuntu pre-installed; It's been ages since I've used Linux as a desktop, this is a thread where I intend to share various tips which might be useful. Anyone else is of course welcome to contribute :)

Please don't turn this in a 'Linux-sucks-because-$foo-thread'. ;) This is already common knowledge :D

If you would like a Linux experience that is somewhat similar to the BSDs I would recommend Slackware. That is my Linux tip. Slackware is known for being Unix-like. If you are permitted I would give Slackware a try on that Dell. §e
 
Carpetsmoker said:
My employer gave me a Dell XPS laptop with Ubuntu pre-installed; It's been ages since I've used Linux as a desktop, this is a thread where I intend to share various tips which might be useful. Anyone else is of course welcome to contribute :)

Please don't turn this in a 'Linux-sucks-because-$foo-thread'. ;) This is already common knowledge :D

u lucky bastard ;), ... I have a company XPS, but it does have to run a corp windows and it sort of struggles. (e.g. close the lid, but it in ur bag, and it performs well as a bag heater ,... )
 
Back
Top