Ubuntu and Terminal tips and tricks

Comments (2)

While our Linux systems are already packaged to be as good as possible, there are many tips and tweaks that will greatly improve your experience. Here is a random list of the best tips you should know about Ubuntu and other Linux distros. You should already be familiar with many of these tricks but it’s not necessary to be rude about it. Instead, feel free to include your own tips in the comments.

Ubuntu tips

Clear some space with autoremove and clean

Open a terminal and type in the following commands:

sudo apt-get autoremove
sudo apt-get clean

The first command will remove all the unused dependencies and the second clears the cached packages.

Use the Super key as a modifier in Keyboard Shortcuts

One thing that sucks with the Win key is that you can’t use it as a modifier like Ctrl, Shift and Alt for keyboard shortcuts. That can be fixed easily without even opening the terminal. Here is a short tutorial.

Enable Gnome’s Control Panel

Just like on Windows, a control panel is available for Gnome. This one can be enabled by right-clicking the menu bar and clicking Edit menus. Under System, check “Control panel”. You will now have a shortcut to your control panel in the System menu. Alternatively, it can be launched from the terminal by typing gnome-control-center.

Root file manager

When you want to move and delete files, it can be much easier to use the file manager instead of the terminal. Right click on the Applications menu and select Edit menus. Create a new item and in the Command field, type ‘gksu nautilus‘.

Terminal tips

Quickly go back to your /Home directory

If you quickly wish to go back to /Home, just type cd alone in the terminal. It’s always better than double-dot-slashing your way back (cd ../ brings you back to the parent directory). Source.

Go back to the previous directory

For those who play with files and constantly switch between two directories, typing cd - will bring you back to the previous folder (the one you were in before using cd). It’s the equivalent of the “back” button in a GUI file browser. Source.

Auto-complete

When you press tab in the terminal, you will be presented with auto-complete suggestions. It’s a quite handy trick when you can’t completely recall a command’s name. Source.

screenshot

Avoid rewriting the same commands with arrow up

This has to be one of the most useful tips in the terminal and one of the most well known, but it still has its place on this list. When you press arrow up in the terminal, it will bring up the last commands you typed. This even includes the commands you typed in previous terminal sessions. It’s a good trick to save some efforts when you make typos in super long commands.

Repeat an argument with a different command

Using !$ will repeat an argument with a different command, saving you a lot of time when messing with files and directories.

[nicolas@Nick-Ubuntu ~]$ mkdir /this/is/an/argument
[nicolas@Nick-Ubuntu ~]$ cd !$

Repeat the previous command as root

Use sudo !! to repeat a command as root. !! is a keyword to repeat a command.

[nicolas@Nick-Ubuntu ~]$ gedit /your/text/file.txt
[nicolas@Nick-Ubuntu ~]$ sudo !!

An interesting article on Canadian healthcare

Comments (0)

I stumbled upon this today while reading through my Google Reader feeds. It’s a pretty interesting read for those down south who think free healthcare is the way to go. Our healthcare is nothing to rave about, trust me.

Read the article

How can you praise a healthcare system where you have to wait up to two years to get scans and where 5 hours in the waiting room is considered good? The budget is at it, but legislations like the ones mentionned in the article above coupled with horrible ressource management result with an horrible product to the end user.

Remains of the week: Good news, mostly

Comments (1)

Simply because I can’t encompass an entire week into a few Facebook status updates, here’s a brief resume of everything cool that happened this week. There’s a lot to rave about if you’re my mom or someone generally enthusiastic about my development.

First, I was accepted in the Mojo SDK’s early access program. This means I get to play with the Palm Pre’s development tools before anyone else, which is a great opportunity to develop mobile applications for a new market. While I’m slightly deceived by the Palm Pre’s launch, it’s a Linux-based open source platform with free development tools that work on Ubuntu. What is there to whine about? On top of that I’ll get to familiarize with web languages and I’ll have a lil’ something to add to my growing IT experience.

Segundo, I’m losing weight. I know this would be good news to most people out there, but I need to GAIN weight! There are no health concerns involved, but it wouldn’t hurt if I gained a few pounds to complement the kickass tan I got while biking my way across town all week long.

Thirdly, I paid the printer a visit to print some CVs and windshield flyers for my summer occupation. From now on, I’ll be clearing your headlights for 25$. It’s not much, but it does one hell of a job of rejuvenating old rides. It’s exactly what I did on my 2001 Sentra and the clouded headlights turned clear in under an hour. Just drop an email and I’ll take care of it.

Talking about cars, it turns out I won’t be having my licenses before July 9, which is a pain in the ass for me as I expected my exam to be monday. It was actually a communication error since I’ll be getting it ten horribly long days later. The waiting is killing me.

I also decided to do something every techie here should do: clear my Google Reader subscriptions list. As soon as I left for a day or two, I ended up with over 30 unread items and it took me a lot of time to go through them until I realized it’s an absolute waste of productivity. I decided to only keep XKCD and other vital feeds, ditching the webcomics that jumped the shark along the way. I’m trying to slowly waste less time on the computer, recycling most of it into more productive activities.

I guess that was it. The rest is just history.

My kickass, DIY wallet paint job

Comments (0)

I never had any interest in paying over 10 bucks for a wallet but I still wanted an original one to carry my papers around. My current dull, black simili leather wallet does the ‘being a wallet’ thing just fine except for being dull and black. Instead of shopping for hours on eBay, looking for a badass wallet, I decided to just buy a can of white spray paint and paint whatever I wanted on it.

I used masking tape and paper to make a stencil and cover the black parts then I generously sprayed white paint over it. This is the result:

wallet

If you want to try it, don’t use masking tape! The “grunge” look on it is the result of white paint poring through the tape. I’d recommend something like packing tape. Nonetheless, it ended up looking pretty good (practice makes perfect) and the paint doesn’t look like it will go off anytime soon.

By the way, “ник” is “Nick” written in cyrillic alphabet, just because everything is more badass in russian.

Photos du bal

Comments (0)

Pour commémorer le bal le plus mongol au Québec, j’ai mis un album collectif pour le monde qui veulent partager leur photos. C’est rien de fancy, mais c’est toujours mieux que Facebook qui rétrécit les photos. Gênez-vous surtout pas de participer et d’envoyer vos clichés!

Voir les photos du bal

Let’s do some culture jamming!

Comments (1)

screenshot1I received an email from a friend asking me to vote for an unnamed cute chick in a contest to become the Dix 30 (a shopping district) personality. While I like to candidly encourage my friend’s friends’ friends, I never refuse an occasion to mess with the system.

There is this woman, Chantal. She’s not a beauty, not a hottie, not a chick and certainly not a star. Nonetheless, she managed to get to third position (with over 500 contestants, no less), and she might just become the winner with a couple more votes from everyone.

I don’t really care about who wins, but I just want to see what will happen if a generic human wins to an army of supermodels. Will the big evil corporates mess with the votes? The world must know! Vote now! (she’s the third one right now)

I SAID VOTE NOW!

I’m such a lazy ass

Comments (0)

140pounds

So I got a car…

Comments (0)

Oh gosh. I just can’t tell you how long I have been waiting for this moment. That sweet, sweet moment where you embrace the fact that the car parked at the end of the alley is yours. I recall when I was still a kid, 6 months ago, anticipating the day I would have my car end the ensuing summer. I couldn’t have hit the sweet spot closer: a 2001 Sentra with a trunk big enough to fit a dismantled spud cannon, a blanket and a school bag with some room left for a passed out friend (just sayin’). I wanted a big sedan, I got a big sedan. I can carry confortably 4 people and no one will complain! Isn’t life great?

I spent about three hours rubbing the living crap out of the interior, read the manual, messed with every button and compartment in the car and loved in every possible way short of having sex with it. Now all I need is my full licenses, which I’ll get in 18 days from now. Meanwhile I can only wait, burn myself a few CDs, fill my trunk with stuff and clean it until the paint wears off.

Fuck aeronautics

Comments (0)
aeronautics

Click to enlarge

What’s in your car trunk?

Comments (0)

I got my car, yesterday. My first car, a 2001 Nissan Sentra. While I promised myself I wouldn’t invest in that car, I’ll still put some money on a trunk kit. Right now, a blanket, cleaning supplies, emergency tools and a spud gun is the only stuff that comes to mind right now.

Any ideas?