10 Powerful Linux Commands You Should Know!

We always say that the most powerful Linux tools are its Command lines. This is because you can do about everything right from your command line. You can easily explain your computer exactly what you require and it comes back to you with appropriate results. Infact there are some commands that make this tool even more powerful! Here we bring to you a list of 10 such commands that work like energy drinks for you Linux machines!

1. Runing the last command as Root


sudo !!

Also if you want to open some file to make changes and right when want to save it, you realise that you forgot to open it as root, there is nothing to worry. The command above is your solution.

2. To find your external IP address.

curl ifconfig.me

3. Run your previous command with replacing “foo” with “bar”

^foo^bar

Or alternatively you can use the below command:

!!:gs/foo/bar

Also after running a long command, if you realise that you have made a mistake, this command helps you replace that one word instead of running the whole command again, unlike the previous command which can only replace foo.

4. Auto-empty any file without removing it

> file.txt

5. Execute command without saving it in the history

command

6. Slick way to copy or backup a file before you edit it.

cp filename{,.bak}

7. Traceroute is a nice command but how about a single network diagnostic tool that can combine traceroute with ping? mtr is your command.

mtr efytimes.com

8. To Clear your terminal’s screen

ctrl-l

9. List of commands you use most often

history | awk ‘{a[$2]++}END{for(i in a){print a[i] ” ” i}}’ | sort -rn | head

10. Saving the file you edited in vim/vi without the required permissions

:w !sudo tee %

 

If you have some suggestions of your own please comment..

 

 

Best collection of Secret codes for smartphones

 

1. Complete Information About your Phone  

*#*#4636#*#*
 This code is used to get some  really interesting information about your phone and battery. It shows following 4 menus on screen:
  • Phone information
  • Battery information
  • Battery history
  • Usage statistics
2. Factory data reset
*#*#7780#*#*
This code is used for the factory data reset. It’ll remove following things:
  • All the Google account settings stored in your phone
  • System and application data and settings
  • Downloaded applications in your Internal SD!
It’ll NOT remove:
  • Current system software and bundled application
  • SD card files e.g. photos, music files, etc.
Note: Once you give this code, you get a prompt screen asking you to click on “Reset phone” button. So you get a chance to cancel your operation.
3. Format Android Phone
  *2767*3855#
4. Phone Camera Update
*#*#34971539#*#*
This code can be used to get information about phone camera. It displays the follwing 4 menus:
  • Update camera firmware in image (Don’t try this option)
  • Update camera firmware in SD card
  • Get camera firmware version
  • Get firmware update count
WARNING: Never use the first option otherwise your phone camera will stop working and you’ll need to take your phone to service center to reinstall camera firmware.
5. End Call/Power
*#*#7594#*#*
This one is my favorite one. This code is used to change the “End Call / Power” button action in your phone. By default, if you long press the button, it shows a screen asking you to select any option from Silent mode, AirPlane mode and Power off.
You can change this action using this code. You can enable direct power off on this button so you don’t need to waste your time in selecting the option.
6. File Copy for Creating Backup
*#*#273283*255*663282*#*#*
This code helps you in opening a File copy screen where you can backup your media files e.g. Images, Sound, Video and Voice memo.
7.  Service Mode
 
*#*#197328640#*#*
This code can be used to enter into Service mode. You can run various tests and also change settings in the service mode.
8. WLAN, GPS and Bluetooth Test Codes:
*#*#232339#*#* OR *#*#526#*#* OR *#*#528#*#*           – WLAN test
 
*#*#232338#*#*                  – It Shows WiFi MAC address

 

*#*#1472365#*#*                – GPS test

 

*#*#1575#*#*                      – Another GPS test

 

*#*#232331#*#*                  – Bluetooth test

 

*#*#232337#*#                    – Shows Bluetooth device address
9. Codes to get Firmware version information:
*#*#4986*2650468#*#* – PDA, Phone, H/W, RFCallDate

 

*#*#1234#*#* – PDA and Phone

 

*#*#1111#*#* – FTA SW Version

 

*#*#2222#*#* – FTA HW Version

 

*#*#44336#*#* – PDA, Phone, CSC, Build Time, Changelist number
10. Codes to launch various Factory Tests:
*#*#0283#*#* – Packet Loopback

 

*#*#0*#*#* – LCD test

 

*#*#0673#*#* OR *#*#0289#*#* – Melody test

 

*#*#0842#*#* – Device test (Vibration test and BackLight test)

 

*#*#2663#*#* – Touch screen version

 

*#*#2664#*#* – Touch screen test

 

*#*#0588#*#* – Proximity sensor test

 

*#*#3264#*#* – RAM version
These were Some of the Secret Hidden Android Codes which I have collected from Various website , if you have any suggestions , please comment below 🙂