How to recover from a chmod -R 000 /bin?

If the chmod binary was set to 000, how would you fix it? You can face a problem with /bin/chmod permission denied so you will be not able to apply for permissions. There is a method to recover it by reinstalling coreutils
# ls -ls /bin/chmod 
60 -rwxr-xr-x 1 root root 58584 Nov  5 20:46 /bin/chmod

# chmod 000 /bin/chmod 

# ls -ls /bin/chmod 
60 ---------- 1 root root 58584 Nov  5 20:46 /bin/chmod

# uname -a
Linux centos-01 3.10.0-514.6.1.el7.x86_64 #1 SMP Wed Jan 18 13:06:36 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

# rpm --query centos-release
centos-release-7-3.1611.el7.centos.x86_64

[root@centos-01 ~]# ls -l
total 12
drwxr-xr-x 2 root root 4096 Apr  6 22:54 linox
drwxr-xr-x 2 root root 4096 Apr  6 22:54 pac
drwxr-xr-x 2 root root 4096 Apr  6 22:54 utils

# chmod 640 linox
-bash: /usr/bin/chmod: Permission denied

# wget http://mirror.centos.org/centos/7/os/x86_64/Packages/coreutils-8.22-18.el7.x86_64.rpm
--2017-04-06 23:23:44--  http://mirror.centos.org/centos/7/os/x86_64/Packages/coreutils-8.22-18.el7.x86_64.rpm
Resolving mirror.centos.org (mirror.centos.org)... 204.15.73.245, 2604:eb80:1:4::10
Connecting to mirror.centos.org (mirror.centos.org)|204.15.73.245|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3412144 (3.3M) [application/x-rpm]
Saving to: ‘coreutils-8.22-18.el7.x86_64.rpm’

100%[============================================================================================================>] 3,412,144   4.84MB/s   in 0.7s   

2017-04-06 23:23:45 (4.84 MB/s) - ‘coreutils-8.22-18.el7.x86_64.rpm’ saved [3412144/3412144]

# rpm -Uvh --force coreutils-8.22-18.el7.x86_64.rpm 
Preparing...                          ################################# [100%]
Updating / installing...
   1:coreutils-8.22-18.el7            ################################# [100%]

# ls -ls /bin/chmod 
60 -rwxr-xr-x 1 root root 58584 Nov  5 20:46 /bin/chmod

# chmod 640 linox
# ls -ls
total 3348
3336 -rw-r--r-- 1 root root 3412144 Nov 20 17:26 coreutils-8.22-18.el7.x86_64.rpm
   4 drw-r----- 2 root root    4096 Apr  6 22:54 linox
   4 drwxr-xr-x 2 root root    4096 Apr  6 22:54 pac
   4 drwxr-xr-x 2 root root    4096 Apr  6 22:54 utils
Reinstalling coreutils also works on Apt based systems.

7) What is the difference between tar and zip ?

Sometimes sysadmins Linux need to save data safety and to this, it is recommended to compress the data. We have some methods or commands for compression on Linux. So frequently asked questions could be why should I use this command instead of another one example, why should I use tar instead of zip. To answer this, you should know the difference between the two.
tar is only an archiver whereas zip is an archiver and compressor. Tar uses gzip and bzip2 to achieve compression. With using tar command, we preserve metadata information of file and directories like seiuidsetgid and sticky bitinformation which are very important while zip doesn't preserve theses information. It is very important for criticals information. Other advantages of using tar is the fact that it assembles all the files into a single file to compress directly while zip compress file by file.

8) How to check open ports on a remote server without netcat or nmap linux command?

In the work of sysadmin, we can sometimes want to check open ports on our remote server. But if we are on a machine where can not install nmap or we don't have the possibility to install a tool which can help us to check open ports, what could we do?
We can check it with bash using /dev/tcp or /dev/udp to open a TCP or UDP connection to the associated socket. The command behavior is:
$ echo > /dev/tcp/$host/$port
we can associate a message to display if the port is opened
$ echo > /etc/tcp/8.8.8.8/53 && echo "OPEN PORT" 
OPEN PORT

$ echo > /dev/tcp/8.8.8.8/80 && echo "GOOD" || echo "NOT OPEN"
-bash: connect: Connection timed out
-bash: /dev/tcp/8.8.8.8/80: Connection timed out
NOT OPEN