Viewing 1 to 80 of 373 items
Archive | Questions Interview Linux RSS feed for this section

Questions Interview Linux

How to Install an SSL Certificate

An SSL Certificate is a text file with encrypted data that you install on your server so that you can secure/encrypt sensitive communications between your site and your customers. After you create a CSR (certificate signing request) and purchase a certificate, our Validation team validates and processes your certificate request. Once validated, we issue your  Full Article…

0

What does RSA stand for?

RSA encryption is a public-key encryption technology developed by RSA Data Security. The RSA algorithm is based on the difficulty in factoring very large numbers. Based on this principle, the RSA encryption algorithm uses prime factorization as the trap door for encryption. Deducing an RSA key, therefore, takes a huge amount of time and processing  Full Article…

0

linux-sysadmin-interview-questions-1

Using the OSI model, which layer has the responsibility of making sure that the packet gets where it is supposed to go? What is the subnet mask, network address and broadcast address for the following address: 123.65.47.62/22? What command is used to show all open ports and/or socket connections on a machine? What is NAT?  Full Article…

0

Number of Processes

ps ax | wc -l | tr -d ” ” OR ps ax | wc -l | awk ‘{print $1}’ OR ps ax | wc -l | sed -e “s: ::g”. In each case, tr or awk or sed is used to remove the undesirable whitespace. Relative speed: any one of these variants takes about  Full Article…

0

Total Bytes in the Current Directory

If you want to know how much space the contents of the current directory take up, you can use something like the following: let TotalBytes=0 for Bytes in $(ls -l | grep “^-” | awk ‘{ print $5 }’) do let TotalBytes=$TotalBytes+$Bytes done # The if…fi’s give a more specific output in byte, kilobyte, megabyte,  Full Article…

0

What is noatime and how does it work?

Linux records information about when files were created and last modified as well as when it was last accessed. There is a cost associated with recording the last access time. ext2/ext3 file systems have an attribute that allows the super-user to mark individual files such that their last access time is not recorded. This may  Full Article…

0

What are the process states in Unix?

As a process executes it changes state according to its circumstances. Unix processes have the following states: Running* : The process is either running or it is ready to run . Waiting* : The process is waiting for an event or for a resource. Stopped* : The process has been stopped, usually by receiving a signal. Zombie* : The  Full Article…

0

How to Setup network on centos 7

Setup network on centos 7 let’s start, Type “nmcli d” command in your terminal for quick identification of Ethernet cards installed in your machine. Here we have 2 interfaces named “enp0s17” and “enp0s18” . it might be different in your case ( Eg: em1 or p4p1 ). GUI Mode Recommended for beginners Step 1 »  Full Article…

0

What is Dead Lock

Dead-Lock is occurred in multiple users Computing Environment. As we know that there is Many Number of users those are going to perform their Transactions. Dead-Lock has occurred when two or More Users are requesting for data item or for a Resource of System for example two or more users Request for the Printers at  Full Article…

0

Differentiate between RAM and ROM?

RAM: Read / Write memory, High Speed, Volatile Memory. ROM: Read only memory, Low Speed, Non Voliate Memory. 1. When power is lost or turned off, a ROM chip will keep the information stored on it. In contrast, a RAM chip is volatile and requires a constant source of power to retain information. 2. A  Full Article…

0

What is cache memory?

Cache memory is a small high-speed memory. It is used for temporary storage of data & information between the main memory and the CPU (center processing unit). Thecache memory is only in RAM.

0

TCP Three way handshake

The TCP three-way handshake in Transmission Control Protocol (also called the TCP-handshake; three message handshake and/or SYN-SYN-ACK) is the method used by TCP set up a TCP/IP connection over an Internet Protocol based network. TCP’s three way handshaking technique is often referred to as “SYN-SYN-ACK” (or more accurately SYN, SYN-ACK, ACK) because there are three  Full Article…

0

What is boot strap protocol

The Bootstrap Protocol (BOOTP) is a computer networking protocol used in Internet Protocol networks to automatically assign an IP address to network devices from a configuration server. The BOOTP was originally defined in RFC 951. BOOTP was largely replaced by the more efficient Dynamic Host Configuration Protocol (DHCP), which has more options and flexibility. However,  Full Article…

0

IPTABLES  Interview Questions 

How to disable IPTABLES ? ================== # service iptables save # service iptables stop # chkconfig iptables off How To clear IP rules in IPTABLES use below commands: ===================================== # iptables -F # iptables -X # iptables -t nat -F # iptables -t nat -X # iptables -t mangle -F # iptables -t mangle -X  Full Article…

0

YUM Interview Questions and Answers

1.What is yum  ? Answer: yum is “yellow update manager” which is a front end tool for package management. All the rpm commands activity can be carried out using yum command in automated way. Yum mechanism will automatically resolve the dependencies unlike rpm commands. 2.How to install packages using yum ? Answer:yum install package_name 3.How  Full Article…

0

Apache Interview Questions

1) What’s the command to stop Apache? kill the specific process that httpd is running under, or killall httpd. If you have apachectl installed, use apachectl stop. 2) How do you set up a virtual host in Apache? <VirtualHost www.amitmaheshwari.in> ServerAdmin admin@amitmaheshwari.in DocumentRoot /home/apache/share/htdocs/hostedsites ServerName www.amitmaheshwari.in ErrorLog /home/apache/logs/error/hostedsites/error_log TransferLog /home/apache/logs/access/hostedsites/access_log </VirtualHost> 3) What is mod_vhost_alias?  Full Article…

0

SSH Login Without Password

1. Create an SSH Key Use the ssh-keygen command to create an SSH key.  Accept all the defaults by pressing ENTER at every prompt.  You’ll want to leave the passphrase empty. linuxsvr01$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/user/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same  Full Article…

0

OSI model

  In order to help you understand the OSI Model, I am going to briefly describe how each layer functions in a Building Automation System framework: Physical Layer- This is the media you use to communicate (RS-485/Ethernet ect). Data Link Layer– This is the subnet communication, or for example, the communication of MS/TP on a  Full Article…

0

Find where inodes are being used

So I received a warning from our monitoring system on one of our boxes that the number of free inodes on a filesystem was getting low. df -i output shows this: Filesystem Inodes IUsed IFree IUse% Mounted on /dev/xvda1 524288 422613 101675 81% / As you can see, the root partition has 81% of its  Full Article…

0

Understanding TCP/IP Subnets

A TCP/IP subnet is a segment of a network where all of the computers on that segment can communicate with each other without having to go through a router.  The computers on the subnet will have IP addresses that are within a given range of addresses, and those addresses will all have the same network  Full Article…

0

Configure Static IP Address in CentOS

The following steps will show configuration of static IP address in CentOS machine. Files needed for network configuration are under /etc/sysconfig/network-scripts. So open the file with editor like nano or vi. Here I will use nano editor. After you start your server running CentOS enter root user credentials and get in. Type the command, #  Full Article…

0

Kernel Using PXE Boot

So, here’s the plan: Set up a PXE environment. Find the minimal kernel config that exhibits the issue. Create a custom initrd containing all the tools needed to detect whether an issue is there. Create a script that can be reliably used by git bisect to make it all run automatically. PXE PXE is a  Full Article…

0

Tehnical Interview

What are all the components in a PC or Server? PC: chassi, system board, psu, cpu, ram, hdd, fans, cables, graphics card, dvd, monitor, keyboard/mouse Server: same with deduction of a extra graphics card (is one on the system board), and addition of hdd controller, possibly backplane, no cd/dvd, extra nic, double cpu, ram, psu,  Full Article…

0

Explain step by step how to create a new VM (LVM storage) using the xen CLI

Logical Volume Management (AKA LVM) is a powerful, robust mechanism for managing storage space. How LVM works In LVM, there are several layers, each builds on top of the other: PV[s] (Physical Volumes) -> VG[s] (Volume Groups) -> LV[s] (Logical Volumes) -> Filesystems. Logical Volumes are allocated/extended within the boundaries of their underlying storage pool  Full Article…

0

LVM Interview Questions and Answers

1.Is it possible to increase the logical volume on fly ? Answer: Yes.We can increase the logical volume without umount it. 2.How to reduce the logical volume ? is it possible to reduce on fly ? Answer: No.You can’t reduce the logical volume on fly. Here is the steps to reduce the logical volume on  Full Article…

0

SSH Interview Questions and answers

Q:1 What is the default port & configuration file of SSH Server ? Ans: 22 is default port  for ssh and  ‘/etc/ssh/sshd_config’ is the configuration file. Q:2 How to change the default ssh port in linux ? Ans: To change the port , first edit the file ‘ /etc/ssh/sshd_config ‘ , change the  vaule of  Full Article…

0

How to use rsync to move files between servers

Rsync allows you to synchronize directories locally or between two servers. Rsync determines which files are different or new between two locations and then synchronizes the directories. Rsync can be used to copy folders or entire directories. In my examples I use the following Rsync command line options. The -a option enables archive mode which  Full Article…

0

How to change your hostname in CentOS

Open the /etc/sysconfig/network file with your favorite text editor. Modify the HOSTNAME= value to match your FQDN host name. # nano /etc/sysconfig/network HOSTNAME=myserver.domain.com Change the host that is associated to your main IP address for your server, this is for internal networking (found at /etc/hosts): nano /etc/hosts 192.xx.xx.xx myserver.domain.com Hostname Command Line Change The ‘hostname’  Full Article…

0

How do I secure my linux server?

When making your Linux server more secure, you are going to want to look at four areas of the server: The SSH configuration IPTables Configuration (Software Firewall) The logs Applications .This guide assumes you know how to log into your server using SSH. If you do not know how to do this, please first read  Full Article…

0

Swap on Linux Virtual Machines

creates a 1 GB swap partition for new virtual machines by default. For most users, this is plenty of swap space. However, different users may have differing needs. If your needs require a different amount of swap space, this guide shows you how to set up a custom sized swap space. First Steps Codero configures  Full Article…

0

Improving Performance on Low-Memory Linux VMs

Low-memory Linux virtual machines (less than 4GB RAM) can be cost-effective means for running web applications or hosting websites. However, sometimes performance can be constrained on such VMs. Presented below are a few suggestions for maximizing performance on low-memory Linux VMs. Kernel tuning We will use the ´sysctl´ program to tune a couple of Linux  Full Article…

0

How to reset your root MySQL password

Stop the MySQL process # service mysqld stop Once MySQL has stopped, restart it with the –skip-grant-tables option # mysqld_safe –skip-grant-tables & or edit your /etc/my.cnf file to add the line skip-grant-tables Connect to MySQL using the root user. mysql -u root Once logged in, you should see the following prompt: mysql> Enter the following  Full Article…

0

How to add an IP address to a Ubuntu server

First, make a backup of the /etc/network/interfaces file. cp /etc/network/interfaces /root/interfaces.bak Edit the /etc/network/interfaces file. vi /etc/network/interfaces Add a section for as many IP addresses as you are adding. auto eth0:0 iface eth0:0 inet static address xx.xx.xx.xx netmask 255.255.255.0 Fill in the address with your new IP address. Increment each new IP address interface by  Full Article…

0

Add an IP address to my Linux Server

Adding an IP address to a CentOS server is very easy. Go to the network configuration directory /etc/sysconfig/network-scripts Create a file with the name ifcfg-eth0:1 (This file increments, so if you already have several IP addresses you need to add the next increment, such as ifcfg-eth0:3 for the 4th IP) Paste the following contents into  Full Article…

0

How do I optimize MySQL?

MySQL, and databasing at large, is primarily meant for the storage and retrieval of large amounts of data, yet the default configuration file allocates very little memory to the MySQL service. When MySQL is afforded enough memory, much of your data can be stored in memory. The more data that is stored in MySQL’s memory,  Full Article…

0

How do I mount a slaved hard drive?

Check to see how many drives are installed: You can do this using the fdisk command. [root@default]# fdisk -l | grep ‘^Disk You should see output similar to the following: Disk /dev/sda: 251.0 GB, 251000193024 bytes Disk /dev/sdb: 251.0 GB, 251000193024 bytes   Mount the new disk using the mount command: First, you’ll need to  Full Article…

0

Explain how to add a new harddrive in Linux (Start from the scratch with holding the hdd in your hand)

Getting Started: Check to see how many drives are installed: You can do this using the fdisk command.  [root@default]# fdisk -l | grep ‘^Disk’ You should output similar to the following: Disk /dev/sda: 251.0 GB, 251000193024 bytes Disk /dev/sdb: 251.0 GB, 251000193024 bytes A device name refers to the entire hard disk. For more information see Linux partition naming  Full Article…

0

Packet injection – forging packets

Packet injection (also known as forging packets or spoofing packets) is a computer networking term that refers to the process of interfering with an established network connection, by means of constructing packets to appear as if they are part of the normal communication stream. The packet injection process allows an unknown third party to disrupt  Full Article…

0

How do I find the UUID of a filesystem

Look up data on /dev/sda1: topher@crucible:~$ sudo blkid /dev/sda1 /dev/sda1: UUID=”727cac18-044b-4504-87f1-a5aefa774bda” TYPE=”ext3″ Show UUID data for all partitions: topher@crucible:~$ sudo blkid /dev/sda1: UUID=”727cac18-044b-4504-87f1-a5aefa774bda” TYPE=”ext3″ /dev/sdb: UUID=”467c4aa9-963d-4467-8cd0-d58caaacaff4″ TYPE=”ext3″ Show UUID data for all partitions in easier to read format: (Note: in newer releases, blkid -L has a different meaning, and blkid -o list should be used  Full Article…

0

List of TCP and UDP port numbers

Port TCP UDP Description Status 0 N/A N/A In programming APIs (not in communication between hosts), requests a system-allocated (dynamic) port[3][4] N/A 0 UDP Reserved Official 1 TCP UDP TCP Port Service Multiplexer (TCPMUX) Official 2 TCP UDP CompressNET[5] Management Utility[6] Official 3 TCP UDP CompressNET[5] Compression Process[7] Official 4 TCP UDP Unassigned Official 5  Full Article…

0

PXE Booting and Kickstart

a single config file control process ks.conf use anaconda-ks.cfg  in /root # cp anaconda-ks.cfg /var/ftp/pub/ # chmod 755 /var/ftp/pub/anaconda-ks.cfg use /csconfig GUI put ks.conf on teh network type  “linux=nfs:192.123.12.3:/ks/ks.conf”    <— at boot prompt PXE works with Network Interface Card (NIC) of the system by making it function like a boot device. The PXE-enabled NIC of  Full Article…

0

Add static IP Addresses Linux Arch CentOS Ubuntu Fedora OpenSUSE

Arch Add the following addressing to the interface’s configuration. /etc/systemd/network/05-eth0.network 1 2 3 4 5 6 7 8 9 10 11 12 13 14 [Match] Name=eth0 [Network] Gateway=198.51.100.1 # Your primary public IP address Address=198.51.100.2/24 # To add a second public IP address: Address=198.51.100.3/24 #To add a private IP address: Address=192.168.133.234/17 Static IP addresses can  Full Article…

0

How can I get my external IP address in bash?

Using dig with OpenDNS as resolver: dig +short myip.opendns.com @resolver1.opendns.com Perhaps alias it in your bashrc so it’s easy to remember alias wanip=’dig +short myip.opendns.com @resolver1.opendns.com’ Responds with a plain ip address: $ wanip 12.100.14.123     curl -s http://whatismijnip.nl |cut -d ” ” -f 5 curl -s icanhazip.com The fastest method using DNS: dig  Full Article…

0

jumbo frames

Jumbo frames : Ethernet frames are normally 1.500 bytes(payload) but the Jumbo Frame spec allows MTUs of 9.000 bytes Jumbo frames are used on local area networks that support at least 1 Gbps and can be as large as 9,000 bytes. Because jumbo frames are not defined in the IEEE 802.3 specifications for Ethernet, vendor  Full Article…

0

NAS vs SAN

Nas Network Attached Storage – File level access to storage using CIFS or NFS the cost effective option Storage Area Network SAn Block Level access to storage you can easily virtualize iSCSI     What is a file storage? File storage, also called file-level storage, or file-based storage is a type of storage that stores  Full Article…

0

VXLAN (Virtual Extensible LAN)

Virtual Extensible LAN (VXLAN) is a proposed encapsulation protocol for running an overlay network on existing Layer 3 infrastructure. An overlay network is a virtual network that is built on top of existing network Layer 2 and Layer 3 technologies to support elastic compute architectures. The primary goal of VXLAN is to extend the virtual  Full Article…

0