Tuesday, 23 November 2010

Some useful linux commands

This page lists some of the useful linux commands you might need to be using frequently. This is however not the complete list of the commands, rather I'd try to post more and more useful linux commands here.

gksudo command/program - run the visual sudo and start the specified command/program with elevated privilege.

sudo command - run the command with elevated privilege.

ps -A | grep -i your_program_name - ps gives the snapshot of the current running processes and this can be quite useful to view the running program's PID to use with kill command.

kill pid - this will kill the target program by using PID. you might need to use sudo version sometimes if the running program was not run by the current user.

ifconfig - display the network interface information. iwconfig is the similar tool for the wireless device.

ufw enable/disable - enable or disable the firewall.

uname -a - get every information about your linux kernel.

sudo dpkg --configure -a - configure and repair the broken package.

I'll be updating this list with any commands I happen to remember.