Social profiles

You can use ls -l command (list information about the FILEs) to find our the file / directory owner and group names. $ ls -l filename Sample Output: -rw-r–r– 1 tecexpertz root 3584 Jun 5 00:00 filename Explanation, -rw-r–r– : file mode 1 – number of links tecexpertz – Owner Continue Reading

chown command changes the user and/or group ownership of for given file. The syntax is: chown owner-user file chown owner-user:owner-group file chown owner-user:owner-group directory chown -R owner-user:owner-group directory -R – Recursively change ownership of directories and their contents.

You can also use the chgrp command to change the group of a file or a directory. You must be the root user or the owner of the file in order to change the group ownership. The options of using chgrp are the same as using chown. $ chgrp -Rv usergroup directory $ chgrp usergroup file

You can find default gateway using ip, route and netstat commands in Linux systems [root@server ~]$ route -n Kernel IP routing table Destination     Gateway      Genmask Flags    Metric Ref Use Iface 192.168.64.   0 U 1 0 0 eth0 192.   Continue Reading

  A simple curl command can fetch HTTP headers from a website. You have to login as root, then open the terminal and execute the below command. It will return the HTTP headers from the website you have typed. $ curl -I NOTE : is the Domain name you Continue Reading

HOSTS file is located in /etc/ folder and looks like this: localhost If you try to access from the server, Sometimes it won’t work. Test 01: Check the  /etc/nsswitch.conf # /etc/nsswitch.conf # # Example configuration of GNU Name Service Switch functionality. # If you have the Continue Reading

Permanent hostname change on RedHat based systems RedHat/CentOS and Fedora distribution use the file /etc/sysconfig/network to read the hostname at system boot. This is set using the init script /etc/rc.d/rc.sysinit /etc/sysconfig/network NETWORKING=yes HOSTNAME=”” GATEWAY=”″ GATEWAYDEV=”eth0″ FORWARD_IPV4=”yes” Debian / Ubuntu: Change Hostname Edit, /etc/hostname file, enter: vi /etc/hostname Delete old name and add new name: Continue Reading