Pages

Wednesday, June 28, 2017

11 Lesser Known Useful Linux Commands

Linux command line attracts most of the Linux Enthusiastic. A normal Linux user generally posses a vocabulary of roughly 50-60 commands to carry out their day-to-day task. Linux commands and their switches remains the most valuable treasure for a Linux-userShell-script programmer and Administrator. There are some Linux Commands which are lesser Known, yet very useful and handy irrespective of the fact whether you are a Novice or an Advanced User.

Lesser Known Linux Commands
Lesser Known Linux Commands
This very article aims at throwing light on some of the lesser known Linux commands which surely will help you to handle your Desktop/Server more efficiently.

1. sudo !! command

Running the command without specifying sudo command will give you permission denied error. So, you don’t need to rewrite the whole command again just put ‘!!‘ will grab the last command.
$ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) 
E: Unable to lock directory /var/lib/apt/lists/ 
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) 
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
$ sudo !!
sudo apt-get update 
[sudo] password for server: 
…
..
Fetched 474 kB in 16s (28.0 kB/s) 
Reading package lists... Done 
server@localhost:~$

2. python command

The below command generates a simple web page over HTTP for the directory structure tree and can be accessed at port 8000 in browser till interrupt signal is sent.
# python -m SimpleHTTPServer
python -m SimpleHTTPServer
Directory Structure Tree

3. mtr Command

Most of us are familiar with ping and traceroute. How about combining the functionality of both the command into one with mtr command. In case mtr is not installed into your machine, apt or yum the required package.
$ sudo apt-get install mtr (On Debian based Systems)
# yum install mtr (On Red Hat based Systems)
Now run mtr command to start investigating the network connection between the host mtr runs on and google.com.
      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
                                                    ► Read more: http://adf.ly/1nBSD3
      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

No comments:

Post a Comment