Skip to content

Instantly share code, notes, and snippets.

@justjkk
Forked from tecoholic/ubuntu.sh
Created May 24, 2011 17:12
Show Gist options
  • Save justjkk/989151 to your computer and use it in GitHub Desktop.
Save justjkk/989151 to your computer and use it in GitHub Desktop.
Useful Ubuntu Commands
# Package to install, to get an open terminal in Right-Click context menu.
sudo apt-get install nautilus-open-terminal
# To move window controls in your Ubuntu from left to right…
gconftool-2 --type string --set /apps/metacity/general/button_layout "menu:minimize,maximize,close"
# To switch back
gconftool-2 --type string --set /apps/metacity/general/button_layout "close,maximize,minimize:menu"
# Repeat last command with sudo
sudo !!
# Save changes into the file even if you forgot to open it with sudo (For Command-line Editor VI)
:w !sudo tee %
# Find out Ubuntu version using Command Line
cat /etc/issue
# or
cat /etc/issue.net
# also
lsb_release -a
# or
cat /etc/lsb-release
# Install Nautilus Terminal in ubuntu (A embedded terminal for Nautilus Terminal)
sudo add-apt-repository ppa:flozz/flozz
sudo apt-get update
sudo apt-get install nautilus-terminal
# Restart nautilus using the following command from your terminal
nautilus -q && nautilus & exit
# Looking up pattern in many files
grep -r -n "\s\+$" * #prints lines containing trailing whitespace
egrep -r -n "FIXME|XXX|TODO" * #show all lines containing FIXME, XXX, TODO words
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment