Thursday, February 25, 2016
Using cheat for getting help with unix commands.
There are lots of tools and commands in unix systems for various purposes. Some tools we need in our day to day activities but some tools are using very rarely. For both of these instances most of time we are facing forgetting the commands that relevant to a tool or a command. Even a tool that we are using daily sometimes we are getting trouble when we execute some commands we have not been used previously. And also sometimes even if we know the command we may forgot what actual does that command. So to identify those things there is a great tool called Cheat.
Using cheat in terminal you can get the usage of most of the unix tools and commands. And it's not like man. It gives us "what you want to do? and here is the command for it".
How to install cheat?
If you have installed python simply run the following command
Tuesday, February 23, 2016
Config CentOS as Gateway / Firewall mode
We can use Cent OS as a gateway in a network to implement other function as a firewall also. So here are steps.
Firstly if you have not installed iptables install it as follows.
Debian
apt-get install iptables-services
Redhat
yum install iptables-services
It is important to install iptables-services packages.
1) Load the modules.
This is not need to done in newer linux versions.
modprobe ip_conntrack
modprobe ip_conntrack_ftp
modprobe ip_conntrack_irc
modprobe ip_nat_ftp
2) Disable ECN if enabled.
Firstly if you have not installed iptables install it as follows.
Debian
apt-get install iptables-services
Redhat
yum install iptables-services
It is important to install iptables-services packages.
1) Load the modules.
This is not need to done in newer linux versions.
modprobe ip_conntrack
modprobe ip_conntrack_ftp
modprobe ip_conntrack_irc
modprobe ip_nat_ftp
2) Disable ECN if enabled.
Linux shell with effective way (ways to use it)
Here we are going to focus on linux / unix shell with specific symbols which we can use the shell in effective manner.
The symbols are,
|, \ , &, &&, [], [[]], (), {}
These symbols are very usefull in bash.
Using pipe symbol in shell
| the pipe sign can use to pipe the output of a command. simply it's forwarding what have in stdout in to stdin.
ex:
here we get the output of the ls /etc and put it into the grep gtk command as an input to that command.
Logical Operators.
The symbols are,
|, \ , &, &&, [], [[]], (), {}
These symbols are very usefull in bash.
Using pipe symbol in shell
| the pipe sign can use to pipe the output of a command. simply it's forwarding what have in stdout in to stdin.
ex:
ls /etc | grep gtk
here we get the output of the ls /etc and put it into the grep gtk command as an input to that command.
Logical Operators.
Subscribe to:
Posts (Atom)