View Single Post
Old April 26th, 2007   #1
locke.dragon
Dipped in Ubuntu
 
locke.dragon's Avatar
 
Join Date: Mar 2007
Location: Genova, Italy
Beans: 517
Ubuntu 7.04 Feisty Fawn
How To: Interesting Terminal

Since I'm a noob myself and don't know much about the inner workings of the terminal, I won't shed any light on that subject. But, I would like to share some interesting and useful terminal code I've found. This code was only tested on Ubuntu Feisty Fawn, but it will also work on most Mac OSX computers and should work on all Ubuntu releases.

I plan on updating when I find something new.

If you have any others, please post them!

Entertainment

Watch Star Wars
Code:
 
telnet towel.blinkenlights.nl
Chat with a bot
Code:
 
telnet the-funk.net 7000
Custom ascii text
Code:
banner
See how long your machine has been running
Code:
uptime
To see the arbitrary precision calculator (7^500 is interesting! That's 7 to the 500th power)
Code:
bc
Must enter below code to use the next few
Code:
sudo apt-get install cowsay
See your fortune
Code:
fortune
Use cowsay (replace “message” with your own text in single quotes)
Code:
cowsay 'message'
Cowsay your Amarok lyrics
Code:
dcop amarok player lyrics | cowsay
Must enter below code to use the next few
Code:
sudo apt-get emacs21
--------------------------------------------------

To play 'snake'
Code:
emacs21
Once emacs21 opens, hit...
Quote:
Esc>>”X”
Type in...
Code:
snake
--------------------------------------------------

To play 'tetris'
Code:
emacs21
Once emacs21 opens, hit...
Quote:
Esc>>”X”
Type in...
Code:
tetris
--------------------------------------------------

Useful

Show some computer stats
Code:
lspci
Access a dictionary through terminal (must have a working internet connection)
Note: Replace 'word' with whatever you'd like to search for (without quotes)
Code:
curl dict://dict.org/d:word
Check system temperature and battery charge
Code:
 
acpi -t
See a list of all running processes
Code:
ps aux
View the current time, date, and year
Code:
date
Show a simple calendar
Code:
cal
See what programs are running with the path names
Code:
ps -aux
See your current IP address
Code:
ifconfig -a
See what your system is doing at startup
Code:
dmesg
Show information about the computer users
Code:
finger -l
Show current Ubuntu version
Code:
cat /etc/issue
System Recovery

Backup xorg.conf
Code:
 
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
Replace current xorg.conf with a previously made backup
Code:
 
sudo cp /etc/X11/xorg.conf_backup /etc/X11/xorg.conf
Delete auto xorg.conf backups
Code:
 
sudo rm /etc/X11/xorg.conf.2007*
Use nano to edit xorg.conf (works in “terminal-only” mode)
Code:
 
sudo nano /etc/X11/xorg.conf
Keyboard Shortcuts

Terminal keyboard shortcut for paste
Quote:
Ctrl>>Shift>>Alt>>”V”
Or...
Quote:
Shift>>Insert
Advanced Users Only
Open up a file browser with all privileges
Code:
gksudo nautilus
Edit color options (advanced users only)
Code:
gedit .gtkrc-2.0
Give a .sh file executable priveledges
Code:
chmod +x <file name>

Last edited by locke.dragon; July 18th, 2007 at 11:05 AM..
locke.dragon is offline   Reply With Quote