Some Useful Ubuntu Commands

Here’s a useful guide for some IT people that are getting into Linux, and more specifically Ubuntu.

Basically, it’s a reference for Windows users to do Linux-type commands. I’ll be adding to this post as time goes on.

Shell Commands

sudo -i set the command shell to have root privileges

Networking Commands

ifconfig shows network information (ipconfig in Windows)

ifdown eth0 && ifup eth0 restart your network adapter and get new IP address

ifconfig eth0 netmask up change your IP address

route add default gw set the default gateway

System Commands

init 0 shutdown

init 6 reboot

dmesg print diagnostic messages from the kernel

Disk tools

df Show a summary of disk usage

du Show a directory tree space usage (some nice modifiers in this 🙂 )

tune2fs Allows you to modify disk and filesystem settings. Useful for removing reserved disk space on ext filesystems.


invoke-rc.d service restart Start / Stop a service

update-rc.d service defaults 99 Add service to startup scripts


sudo dpkg-reconfigure flashplugin-installer Reinstall Adobe Flash


uname -a and cat /etc/issue to know what version and distro of Linux you are running

Converting FLVs to playable video

Downloading FLV videos can be a nuisance, as there are few regular players that they work on.

In Linux, there are various ways to convert FLV files to other formats. I’m hoping to build up a collection of commands and comment on the quality of the result.

Hopefully others will find it useful.


<code>ffmpeg -i video.flv -ab 56 -ar 22050 -b 500 -s 320x240 test.mpg</code>
<code>ffmpeg -i video.flv -ab 128 -ar 22050 song.mp3</code>

If you know any more drop me a line…