Ubuntu Reference
Total Page:16
File Type:pdf, Size:1020Kb
Ubuntu Reference Privileges Network sudo command – run command as root ifconfig – show network information sudo su – open a root shell iwconfig – show wireless information sudo su user – open a shell as user sudo iwlist scan – scan for wireless networks sudo -k – forget sudo passwords sudo /etc/init.d/networking restart – reset gksudo command – visual sudo dialog (GNOME) network kdesudo command – visual sudo dialog (KDE) (file) /etc/network/interfaces – manual sudo visudo – edit /etc/sudoers configuration gksudo nautilus – root file manager (GNOME) ifup interface – bring interface online kdesudo konqueror – root file manager (KDE) ifdown interface – disable interface passwd – change your password Special Packages Display ubuntu-desktop – standard Ubuntu environment sudo /etc/init.d/gdm restart – restart X kubuntu-desktop – KDE desktop (GNOME) xubuntu-desktop – XFCE desktop sudo /etc/init.d/kdm restart – restart X ubuntu-minimal – core Ubuntu utilities (KDE) ubuntu-standard – standard Ubuntu utilities (file) /etc/X11/xorg.conf – display ubuntu-restricted-extras – non-free, but useful configuration kubuntu-restricted-extras – KDE of the above sudo dpkg-reconfigure -phigh xserver-xorg – xubuntu-restricted-extras – XFCE of the above reset X configuration build-essential – packages used to compile Ctrl+Alt+Bksp – restart X display if frozen programs Ctrl+Alt+FN – switch to tty N linux-image-generic – latest generic kernel Ctrl+Alt+F7 – switch back to X display image linux-headers-generic – latest build headers System Services¹ start service – start job service (Upstart) Firewall¹ stop service – stop job service (Upstart) ufw enable – turn on the firewall status service – check if service is running ufw disable – turn off the firewall (Upstart) ufw default allow – allow all connections by /etc/init.d/service start – start service default (SysV) ufw default deny – drop all connections by /etc/init.d/service stop – stop service (SysV) default /etc/init.d/service status – check service ufw status – current status and rules (SysV) ufw allow port – allow traffic on port /etc/init.d/service restart – restart service ufw deny port – block port (SysV) ufw deny from ip – block ip adress runlevel – get current runlevel Application Names Package Management¹ nautilus – file manager (GNOME) apt-get update – refresh available updates dolphin – file manager (KDE) apt-get upgrade – upgrade all packages konqueror – web browser (KDE) apt-get dist-upgrade – upgrade Ubuntu version kate – text editor (KDE) apt-get install pkg – install pkg gedit – text editor (GNOME) apt-get remove pkg – uninstall pkg apt-get autoremove – remove obsolete packages System apt-get -f install – try to fix broken packages Recovery - Type the phrase “REISUB” while dpkg --configure -a – try to fix broken holding down Alt and SysRq (PrintScrn) with packages about 1 second between each letter. Your system dpkg -i pkg.deb – install file pkg.deb will reboot. (file) /etc/apt/sources.list – APT repository lsb_release -a – get Ubuntu version list uname -r – get kernel version uname -a – get all kernel information 1. Prefix commands with sudo to run. Ubuntu is a trademark of Canonical Ltd. Licensed under CC-BY-SA 3.0. Free to redistribute; see creativecommons.org for details..