Learn New Linux Tricks and hacks

Here you can learn new Linux tricks and hacks which make your work and life easier. Tricks are nothing but only the life experiences of any person which makes work easier. Everyone has their own way and personal favorite tools. From time to time everyone changes his ways of working and tools these changes called tricks or hacks. If your way is hack is best then it will become a wow – ways of working. 
Here I am sharing some tricks or hack which save my time in Linux.
 
 

ip Command over ifconfig

ifconfig command is very useful but if you want to check IP with port status in on command ip a is best command. After switching to the ip command I never look back for ifconfig. Even if you install the minimal OS then ifconfig is not default configured.

Always Install Minimal OS

We use Linux for its performance and if you are a Linux admin you know in minimal and GUI there is a huge difference. More services and features required more resources. As a smart admin you have to install only minimal OS and install only those services which required. This will increase your server or system performance very effectively.

Less Use NetworkManager

If you are working in a complex network or you always tweak your network configuration disable NetworkManager. This always creates an issue in-network and disables NetworkManager can solve your issue. If it is not possible to disable, ethernet port which creates an issue with NetworkManager add NM_CONTROLLED=no in the configuration file of that port.

Take Backup of etc and bin Folder

If you are in a mid-level company and a full backup is not possible. Then always take backup of etc and bin folder. Because sudo users always change permission or tweak files by mistake and all blame goes to system admin that why it is not working. If possible disable user permission by SELinux to modify these folders.

Use SELinux

Always use SELinux to control other user’s permission. This is only one way to control root also to modify or read user files. Small and in-house we ignore it but in production, we have to use this feature to secure our system.

Alias

Use of alias in daily tasks. There are many tasks which we have to perform on daily basis or we have to guide our junior for work. Some command which is too big like Nagios health check. You can not write the whole command every time either you will copy-paste or call by history. Reduce this task use alias there are two ways to use alias via command which is temporary or you can add in bashrc file which will be permanent.

From bashrc file, every user can create an alias with different keywords. This will help you to perform fast try once after that you will get used to it.

Proxy for YUM

Never use proxy in yum. conf file. Because after that every new repository you will configure will you have mention in .repo file proxy none. Use proxy in .repo file where it is required. This will limit proxy to a particular repository. You have not worry about with new repository just configure and use without proxy error.

Login Banner

Login banner is a must if you want to save system from ethical penetration testers. They will see the warning message to do not login they leave immediately otherwise they will login and do what ever they want and you will have a weak point over them to prove guilty or any action to them.

Now you have some very useful tricks which can save your day. Comment below if you have any other tricks which can be useful for everyone.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top