-
-
Save justjkk/989151 to your computer and use it in GitHub Desktop.
Useful Ubuntu Commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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