Basic Ubuntu Commands for naive

Ubuntu Reference

Privileges

sudo command – run command as root

sudo su – open a root shell

sudo su user – open a shell as user

sudo -k – forget sudo passwords

gksudo command – visual sudo dialog (GNOME)

kdesudo command – visual sudo dialog (KDE)

sudo visudo – edit /etc/sudoers

gksudo nautilus – root file manager (GNOME)

kdesudo konqueror – root file manager (KDE)

passwd – change your password

Network

ifconfig – show network information

iwconfig – show wireless information

sudo iwlist scan – scan for wireless networks

sudo /etc/init.d/networking restart – reset network

(file) /etc/network/interfaces – manual configuration

ifup interface – bring interface online

ifdown interface – disable interface

System Services

start service – start job service (Upstart)

stop service – stop job service (Upstart)

status service – check if service is running (Upstart)

/etc/init.d/service start – start service (SysV)

/etc/init.d/service stop – stop service (SysV)

/etc/init.d/service status – check service (SysV)

/etc/init.d/service restart – restart service (SysV)

runlevel – get current runlevel

Package Management

apt-get update – refresh available updates

apt-get upgrade – upgrade all packages

apt-get dist-upgrade – upgrade

apt-get install pkg – install pkg

apt-get remove pkg – uninstall pkg

apt-get autoremove – remove obsolete packages

apt-get -f install – try to fix broken packages

dpkg –configure -a – try to fix broken packages

dpkg -i pkg.deb – install file pkg.deb

(file) /etc/apt/sources.list – APT repository list

System

Recovery – Type the phrase “REISUB” while holding down Alt and SysRq (PrintScrn) with about 1 second between each letter.

Your system will reboot.

lsb_release -a – get Ubuntu version

uname -r – get kernel version

uname -a – get all kernel information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s