Ubuntu School – sudo Your Last Command

Projects
Sometimes we just forget that we need to specify elevated privileges on our Ubuntu machines. I do it all the time, particularly when I'm setting up a new machine. Thankfully there's a shortcut for those of us who are forgetful. If I want to restart the box I can use a command like: ``` shutdown -r now ``` But of course that command requires elevated privileges: ``` shutdown: Need to be root ``` With the fantastic `!!` argument for sudo you can repeat your last terminal command: ``` sudo !! ``` Now you can quickly and efficiently re-run that last command you forgot to sudo.
Read More

Ubuntu School – DHCP Release and Renew

Projects
It's not uncommon to need to release/renew the IP address for a given machine. This is particularly true if you're doing any kind of maintenance on your network, or are troubleshooting pretty much any kind of Internet problem. I never seem to remember how to do this, so I'm including this post as much for my own benefit as anything. What I'm talking about is the Ubuntu equivalent of these windows commands ``` ipconfig /release ipconfig /renew `` From an Ubuntu terminal type: ``` sudo dhclient -r sudo dhclient ``` Much like the Windows equivalents you can also specify these actions for a specific interface if your situation requires. ``` sudo dhclient eth0 ```
Read More

Ubuntu School – Creating a New User

Projects
There are two built-in commands for creating a user from the command-line in Ubuntu: useradd and adduser. useradd is the older command which has, for the most part, been deprecated in favour of the more user-friendly adduser command. Both will allow you to create new user accounts, set up home directories and generally move in the right direction, but adduser will prompt you for information you didn't include whereas useradd will assume you didn't want those things (ie create the home directory). ``` sudo adduser theboss ``` will produce an output similar to ``` Adding user 'theboss' ... Adding new group 'theboss' (1001) ... Adding new user 'theboss' (1001) with group 'theboss' ... Creating home directory '/home/theboss' ... Copying files from '/etc/skel' ... Enter new UNIX password: Retype new UNIX…
Read More

Three-week Ubuntu Experiment – Migrating to Open-Source

Articles
This past spring I made an attempt to move myself out of the shackles of the commercial software world and truly embrace open-source. I tried to move my primary machine off Windows 7, and onto [Ubuntu Linux](http://www.ubuntu.com/). I knew the transition wouldn't be seamless but I'd heard so many good things about living in a Linux universe that I decided it was time. The experiment did not go as well as I might have hoped, and despite my efforts to stick with it for some time, I eventually had to cut the experiment short. As I was preparing to re-image my system I started a blog post which I decided not to post at the time. I've included a short excerpt which shows my state of mind back in May,…
Read More