How do you change permissions under Linux? Explain chmod?

So long as you are the system administrator or the owner of a file or directory, you can grant permission using the chmod command. Use + symbol to add permission or – symbol to deny permission, along with any of the following letters: u (user), g (group), o (others), a (all), r (read), w (write)…

Explain the OIS Seven-Layer Model – Linux Interview Questions

THE OSI SEVEN-LAYER NETWORK MODEL LINUX The Open System Interconnect (OSI) seven-layer model [OSI7498] was first specified in the early 1980s. Although neither traditional nor modern networking protocols fit neatly into this model, it has been the common framework to discuss and explain networking protocols for over 20 years. The layered model is often called…

Did my Server get hacked? Why can’t I find ifconfig or netstat on my RHEL 7.X or CentOS 7.X Server?

If you got the following. No need to panic. ( You will get the following if you did a minimal install of rhel or centOS) # ifconfig -bash:  ifconfig: command not found As early as RHEL5 and 6 ( CentOS 5 & 6 also).2009..nearly a decade. Wow!. RedHat made the decision to no longer install the…

How to reduce or shrink the size of LVM partition ? 

Below are the logical Steps to reduce size of LVM partition :  -Umount the filesystem using umount command,  -use resize2fs command , e.g resiz2fs /dev/mapper/myvg-mylv 10G  -Now use the lvreduce command , e.g lvreduce -L 10G /dev/mapper/myvg-mylv  Above Command will shrink the size & will make the filesystem size 10GB.    How to create partition from the raw disk ?  Ans: Using fdisk utility we can create partitions…

HowTo Rsync from specific Network

Allow Rsync From a Specific Network  The following rules allows rsync only from a specific network.  iptables -A INPUT -i eth0 -p tcp -s 192.168.101.0/24 –dport 873 -m state –state NEW,ESTABLISHED -j ACCEPT    iptables -A OUTPUT -o eth0 -p tcp –sport 873 -m state –state ESTABLISHED -j ACCEPT  19. Allow MySQL connection only from a specific network  If you are running MySQL, typically you don’t want…

HowTo Rsync

Synchronize Files From Local to Remote  rsync allows you to synchronize files/directories between the local and remote system.  $ rsync -avz /root/temp/ thegeekstuff@192.168.200.10:/home/thegeekstuff/temp/  Password:  building file list … done  ./  rpm/  rpm/Basenames  rpm/Conflictname    sent 15810261 bytes  received 412 bytes  2432411.23 bytes/sec  total size is 45305958  speedup is 2.87  While doing synchronization with the remote server, you need to specify username and ip-address of the remote…

HowTo Find commands in Linux

Practical Linux Find Command Examples  In this article, let us review 15 practical examples of Linux find command that will be very useful to both newbies and experts. First, create the following sample empty files under your home directory to try some of the find command examples mentioned below.  # vim create_sample_files.sh  touch MybashProgram.sh  touch mycprogram.c …