Tweet via linux terminal : the geek way
Do you work most of the time via terminal? Do you hardlay get chance to switch to GUI from CLI? Do you want to look like geek working in terminal even to tweet ur posts? Yes, there is a way now to do it. Below is a step by step instruction on how to do that:
Install a package called Curl (for Debian/Ubuntu) with the command
sudo apt-get install curl
Then, create a file named ‘twitter’ in /usr/bin using the command.
gedit /usr/bin/twitter
Now in the file ‘twitter’, paste the below code by replacing yourusername and yourpassword with your actual twitter username and password respectively.
curl –basic –user “yourusername:yourpasswd” –data-ascii “status=`echo $@|tr ‘ ‘ ‘+’`” “http://twitter.com/statuses/update.json” -o /dev/null; echo Message Sent!
Now give the file executable permission by using the command:
sudo chmod +x /usr/bin/twitter
Thats it. You’re done. Just start tweeting now in the command line by typing twitter{space}{your message}
My first command like tweet reads like:
techrajesh@techrajesh-laptop:~$ twitter my first command line tweet! For command line tweeting, vist www.techrajesh.wordpress.com
What did your first command line tweet read like?
12 Useful but almost Unknown Linux commands
This post is especially targetted for new Linux users focussing on some of the most useful Linux commands which can come handy in different situations. So the list goes something like this:
$ df -h #Displays the hard disk space usage
$ killall [app_name] #Kills a running application by its name
$ whereis [app_name] #Displays the installation directory of any application
$ sudo !! #Runs the last entered command as root
$ ping -i 60 -a [ip address] #Makes an alarm when an ip address goes online
$ mount /path/to/file.iso /mnt/cdrom -o loop #Mounts an iso file into cdrom
$ free -m #Displays free and used RAM
$ whoami #Displays current user
$ uname -a #Displays computer name and OS information including the kernel version
$ ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg #Records your desktop
$ ls /dev/disk/by-uuid/ -alh #Finds Universal Unique Identifier (UUID) of your partitions
$ history #Displays a list of previously typed commands


