You are on page 1of 1

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 our password
Display
sudo /etc/init.d/gdm restart restart !
(GNOME)
sudo /etc/init.d/kdm restart restart !
(KDE)
(file) /etc/X11/xorg.conf displa
configuration
sudo dpkg-reconfigure -phigh xserver-xorg
reset ! configuration
Ctrl+Alt+ksp restart ! displa if fro"en
Ctrl+Alt+!N switch to tt N
Ctrl+Alt+!" switch #ac$ to ! displa
System Services
start service start %o# service (&pstart)
stop service stop %o# service (&pstart)
status service chec$ if service is running
(&pstart)
/etc/init.d/service start start service
('s()
/etc/init.d/service stop stop service ('s()
/etc/init.d/service status chec$ service
('s()
/etc/init.d/service restart restart service
('s()
runlevel get current runlevel
Package Management
apt-get update refresh availa#le updates
apt-get upgrade upgrade all pac$ages
apt-get dist-upgrade upgrade &#untu version
apt-get install pkg install pkg
apt-get remove pkg uninstall pkg
apt-get autoremove remove o#solete pac$ages
apt-get -f install tr to fi) #ro$en pac$ages
dpkg --configure -a tr to fi) #ro$en
pac$ages
dpkg -i pkg.deb install file pkg.deb
(file) /etc/apt/sources.list *+, repositor
list
Network
ifconfig show networ$ information
iwconfig show wireless information
sudo iwlist scan scan for wireless networ$s
sudo /etc/init.d/networking restart reset
networ$
(file) /etc/network/interfaces manual
configuration
ifup interface #ring interface online
ifdown interface disa#le interface
Special Packages
u#untu-desktop standard &#untu environment
ku#untu-desktop KDE des$top
xu#untu-desktop !-.E des$top
u#untu-minimal core &#untu utilities
u#untu-standard standard &#untu utilities
u#untu-restricted-extras non/free0 #ut useful
ku#untu-restricted-extras KDE of the a#ove
xu#untu-restricted-extras !-.E of the a#ove
#uild-essential pac$ages used to compile
programs
linux-image-generic latest generic $ernel
image
linux-headers-generic latest #uild headers
Firewall
ufw ena#le turn on the firewall
ufw disa#le turn off the firewall
ufw default allow allow all connections #
default
ufw default den$ drop all connections #
default
ufw status current status and rules
ufw allow port allow traffic on port
ufw den$ port #loc$ port
ufw den$ from ip #loc$ ip adress
Application Names
nautilus file manager (GNOME)
dolphin file manager (KDE)
konqueror we# #rowser (KDE)
kate te)t editor (KDE)
gedit te)t editor (GNOME)
System
Recovery / ,pe the phrase 12E3'&45 while
holding down *lt and 's26 (+rint'crn) with
a#out 7 second #etween each letter8 9our sstem
will re#oot8
ls#%release -a get &#untu version
uname -r get $ernel version
uname -a get all $ernel information
1. Prefix commands with sudo to run.
Ubuntu is a trademark of Canonical Ltd. Licensed under CC-BY-SA .!. "ree to redistribute# see creati$ecommons.or% for details.

You might also like