Skip to main content

Super Powerful Linux Commands

Here are some quick tricks to utilise the power of your command lines to the max! 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 are 10 commands that work like energy drinks for you Linux machines!  

 1. Runing the last command as Root
sudo !!

2. To find your external IP address.

curl ifconfig.me

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.

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 %

 

Comments

Popular posts from this blog

Run command

"Use Run Command make life easy" Sometime we use many run command in our windows base computer. Run command is very useful for easy work. There are some "run command",

Cloud computing

  Cloud computing is a technology model that enables access to a shared pool of computing resources and services over the Internet. Instead of owning and maintaining physical servers and data centers, organizations can use cloud computing services provided by cloud service providers. These services include computing power, storage, databases, networking, software, and more. Cloud computing services can be categorized into several main models: Infrastructure as a Service (IaaS): IaaS provides virtualized computing resources over the Internet. Users can rent virtual machines, storage, and networking components, allowing them to run and manage their operating systems and applications. Platform as a Service (PaaS): PaaS offers a platform that includes the underlying infrastructure, development tools, and services to build, deploy, and manage applications. Users focus on coding and application development while the platform handles the underlying infrastructure. Software as a Service ...

AWS Free Tier

The AWS Free Tier is designed to give you hands-on experience with a range of Amazon Web Services (AWS) products and services without charging you for usage up to a specific limit. This tier primarily benefits new AWS customers, allowing them to try different AWS services and gain practical experience before committing to more extensive usage. The Free Tier includes offers that are available for 12 months following your AWS sign-up date, as well as offers that are always free. Here are the main components of the AWS Free Tier: 12-Months Free: These offers are available to new AWS customers and are valid for 12 months following your AWS sign-up date. After the 12-month free usage term, you pay standard, pay-as-you-go service rates. Always Free: These offers do not expire and are available to all AWS customers. They provide limited access to a range of AWS services for free forever. However, the usage limits reset monthly. Trials: Short-term trial offers start when you activate a part...