Firefox 16, a treat for developers http://t.co/cnd27CzT
Useful commands for Linux normal users and administrators
Recently, CLI is mostly used by Linux/Unix administrators since most popular linux distros come with a complete set of GUI applications that make the user use less and less the command line. In our previous post, we saw 11 useful commands for Linux/Unix administrators, in this post we will see a list of useful commands useful for both administrators and normal Linux users.
-
For Linux/Unix administrators:
1- Compare a remote dir with a local dir
$ diff -y <(ssh user@host find /boot|sort) <(find /boot|sort)
2- Trace and view network traffic
tcpdump -s 0 -w - port <port> | tcpdump -r - -A
3- Check if a machine is online
ping -c 1 -q MACHINE_IP_OR_NAME >/dev/null 2>&1 && echo ONLINE || echo OFFLINE
PING
parameters
c 1 limits to 1 pinging attempt
q makes the command quiet (or silent mode)
/dev/null 2>&1 is to remove the display
&& echo ONLINE is executed if previous command is successful (return value 0)
|| echo OFFLINE is executed otherwise (return value of 1 if unreachable or 2 if you’re offline yourself).
I personally use this command as an alias with a predefined machine name but there are at least 2 improvements that may be done.
Asking for the machine name or IP
Escaping the output so that it displays ONLINE in green and OFFLINE in red (for instance).
4- Reverse SSH
ssh -f -N -R 8888:localhost:22 user@somedomain.org
Reverse SSH
this command from the source server and this follow in the destination server:
ssh user@localhost -p 8888
5- Show mounted volumes in a table (Thanks to Shawn):
mount | column -t
6- The fastest way to kill tcp or udp port is to run the following command (Thanks to Sriram):
fuser -k PORT-NUMBER-HERE/tcp fuser -k PORT-NUMBER-HERE/udp
7- edit a file on a remote server using vim from your Linux / Unix / OS X desktop:
vim scp://sriram@server1/etc/http/httpd.conf
-
Commands for Both Normal users and Linux admins
8- Grep your command history (Thanks to Shawn)
history | grep /pattern/
9- Extract audio from Flash video (*.flv) as mp3 file
ffmpeg -i video.flv -vn -ar 44100 -ac 2 -ab 192k -f mp3 audio.mp3
10- copy hybrid iso images to USB key for booting from it, progress bar and remaining time are displayed while copying
time (pv file.iso | dd bs=1M oflag=sync of=/dev/sdX 2>/dev/null)
11- what model of computer I’m using?
sudo dmidecode | grep Product
-
-
-
http://www.facebook.com/people/Stephen-Green/100001808911369
-
-
Like us on Facebook
This week Top Posts 
Top Things to do After Installing Ubuntu 13.04 ‘Raring Ringtail’ : Ubuntu 13.04 Raring Ringtail final is almost out. The final release it scheduled for release on Apri...0 comment(s) |
Steganography- Hide Your Files Inside An Image in Linux : Nowadays, our personal computer is not only a work tool, it is also our private space where we sto...1 comment(s) |
Install lamp with 1 command in Ubuntu 12.10, 13.04 Raring Ringtail & LinuxMint13 : Updated: 10/09/2012 :LAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform ...0 comment(s) |
Howto: Upgrade to Ubuntu 13.04 Raring Ringtail from 12.04, 12,10 | Desktop & Server : Updated 05-04-2013: Ubuntu 13.04 Raring Ringtail will be released Soon, If you have ubuntu 12,10, 12...0 comment(s) |
How to use Remote Desktop in Ubuntu : Sometimes, we need to access our computer from other locations when we’re not at home and such. This...0 comment(s) |
Howto- Resolve nosound problem on Ubuntu 13.04 Raring Ringtail,12.10 and Older : Updated 05/04/2013 : One of the common issues facing Ubuntu users after installing or upgrading Ubun...0 comment(s) |
Recent Posts
- Secure File from Removal in Linux and Unix
- How to Install Nginx on FreeBSD 9.x
- Create a Launcher in Ubuntu Using Bash
- Scan Your Home Network With Nmap
- Steganography- Hide Your Files Inside An Image in Linux
- Unix/Linux File Recognition. Did You Know?
- Migrate from MySQL to MariaDB in FreeBSD
- Connect Your Android Galaxy Tablet to Ubuntu via USB
- ElementaryOS Beta 1 and 2 Comparison and Review
- Introduction to the Linux Command Line
Recent Comments



















AD
| #
I need some Help on Linux,can you guide me ?
Edson Carlos
| #
In debian no found. I need link download install in linux debian
jacky can
| #
You can actually unzip your secret archive by leaving out the -t option, instead using:
unzip newPhoto.jpg
DragonFartOutLoud
| #
it went to china.
DragonFartOutLoud
| #
great review! i’ve been using it as my main OS since Beta 1 release. its been a awesome ride so far :)