Hardy cheat sheet

This one goes in the “shameless steal” category but it’s to good not to post.

The guys over at FOSSwire made a pdf with usefull, much used commands for hardy (most, if not all, will work for gutsy too).

Download the pdf file here.

Since I’m not a fan of pdf files, you can download the text based file here. That way it’s easier to copy past commands.

Press “keep reading” if you want to view the html version.

Ubuntu Reference

Note: In ubuntu you enter these commands in the terminal (applications -> accessories)

Note2: If a ¹ is added to the title, read bottom of document first.


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


Display

sudo /etc/init.d/gdm restart – restart X (GNOME)
sudo /etc/init.d/kdm restart – restart X (KDE)
(file) /etc/X11/xorg.conf – display configuration
sudo dpkg-reconfigure -phigh xserver-xorg – reset X configuration
Ctrl+Alt+Bksp – restart X display if frozen
Ctrl+Alt+FN – switch to tty N
Ctrl+Alt+F7 – switch back to X display


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 Ubuntu version
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


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


Special Packages
ubuntu-desktop – standard Ubuntu environment
kubuntu-desktop – KDE desktop
xubuntu-desktop – XFCE desktop
ubuntu-minimal – core Ubuntu utilities
ubuntu-standard – standard Ubuntu utilities
ubuntu-restricted-extras – non-free, but useful
kubuntu-restricted-extras – KDE of the above
xubuntu-restricted-extras – XFCE of the above
build-essential – packages used to compile programs
linux-image-generic – latest generic kernel image
linux-headers-generic – latest build headers


Firewall¹
ufw enable – turn on the firewall
ufw disable – turn off the firewall
ufw default allow – allow all connections by default
ufw default deny – drop all connections by default
ufw status – current status and rules
ufw allow port – allow traffic on port
ufw deny port – block port
ufw deny from ip – block ip adress


Application Names
nautilus – file manager (GNOME)
dolphin – file manager (KDE)
konqueror – web browser/filemanager (KDE)
kate – text editor (KDE)
gedit – text editor (GNOME)


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


1. Prefix commands with sudo to run. (just add sudo before the command)
Ubuntu is a trademark of Canonical Ltd. Licensed under CC-BY-SA 3.0.

Free to redistribute; see creativecommons.org for details.

Original pdf made by http://fosswire.com They deserve credit for this list.

Converted to text by http://linuwowns.wordpress.com.

    • vunknown
    • May 4th, 2008

    I have some trick, you can start multiple X windows

    using
    startx — :1

    possible number is from 0-5 and you can switch to another with Ctrl+Alt+(F7-F12)

    Ctrl+Alt+F7 is go to default X windows consequence from F0-F6 that be tty (black screen)

  1. One of the first signs of excellent to look at is the inner construction
    of the basket you are considering acquiring. In short, she could be born at any time,
    though we still are likely to have a couple more weeks to go.

    Additionally take a look at the way in which the level buttocks
    is attached to the basket’s sides.

  2. Hi there Your website loads up honestly slow for me, I not
    really know who’s issue is that however
    youtube starts up extremely immediate. Around the other hand
    I appreciate you for submitting excellent articles. I guess
    it has become helpful to lots of people .
    I personally must point out that you actually have done amazing job
    with this and expect to find out more awesome things from you.
    Immediately after checking out the post, I have book marked your web site.

  3. Greetings I don’t know whether or not it’s me or perhaps your internet site but it is starting
    slowly to me, it took me just like a few moments
    to finally load up still google does work
    completely . Anyways, I’m going to thank you very much for placing fantastic post.
    Nearly everybody who came to this web site should have found this short article incredibly beneficial.

    I should say that you have done superb job with this and additionally
    wish to see many more wonderful content from you.

    To obtain additional understanding by content you post, I’ve saved this
    web site.

  4. This is my first time pay a quick visit at here and i am genuinely impressed
    to read all at alone place.

  1. No trackbacks yet.

Leave a comment