Wednesday, August 13, 2014

12 Ways to Extend Laptop Battery Life

We all know that, Our Laptops are invaluable for getting our many important works done but they are also only as good as their battery life.

Battery Life Cycle
The lifespan of a battery depends upon its life cycle, usually 350 - 500 times, the number of complete charges-discharge cycles, a battery can perform during its life span. So avoiding needless cycle of charging-discharging is the key method to expand battery life.

You can also extend life of your laptops battery with these steps......

1. One of the factors that affect life of battery is the fan. If there is dust on the fan, Laptops get heated and easily consuming more power. Based on experiences when the fan is cleaned, it start performing well and the speed too is boosted.

2. Avoid exposing your battery to heat. This includes your laptops on a pillow or blanket, which block air flow and make fan to work more. So use laptops at hard work stations. The less the cooling fan has to run, the less battery power is taken.

3. Do not obstruct ventilator of fan.

4. Set your laptops to automatically hibernate mode after a few minutes of in-activity.

5. Avoid using screen saver it consumes more power.

6. Turn off auto save function like MS Word, Excel etc. because they keep saving at regular intervals, they work your hard drive harder than it may have to.

7. Close non-operative windows on laptops as they also consume power.

8. Do not increase screen brightness.

9. If adapter is always available, it is recommended to take off battery with full power under this case, the AC adapter is enough and the battery should be taken out and stored with 50% - 75% capacity and also fully discharging - charging every 3 months. Those who do not like to take out battery please keep AC plug in as much as possible.

10. If you are the user who have to frequently use the battery, it is strongly recommended to select power saving mode and keep AC adapter connected all the time. In this mode; the battery will be fully charged to 80% of its capacity, while before the AC adapter is unavailable; it is recommended to fully charge to 100%.In this mode battery run-time will last longer.

11. USB devices like mouse, data card, Pen Drive drain out power from battery, close or remove them when not in use.

12. Defrag frequently(in a week).The faster your hard drive - the lesser demand for power, you are going to put less load on hard drive. By regular defragmentaion of hard drives the efficiency of laptops is also increases.

Monday, August 11, 2014

How to enable root in Ubuntu 12.04


root is the top administrator account in linux. You can do whatever you want to do while you logged in from root account. This causes security risk. Even a small mistake in file system can crash entire OS.You could type a command incorrectly and destroy the system.
So Ubuntu developers made a conscientious decision to disable the administrative root account by default in all Ubuntu installations. This does not mean that the root account has been deleted or that it may not be accessed. It merely has been given a password which matches no possible encrypted value, therefore may not log in directly by itself.
As a network administrator you may need to enable root account in several circumstances. In this tutorial we would enable root account in Ubuntu 12.04.
During the installation of Ubuntu we need to create one user account. By default this account has permission to run sudo command with his own password. Log in from this account.
enable root normal user login screen
We need Terminal to execute commands. Click on Ubuntu button, type terminal in search box and click on terminal icon. Alternatively you can launch terminal directly by pressing ALT+CTRL+T key combination.
enable root open terminial
Set password for root account. Run following command
sudo passwd root
Just remember, when sudo asks for a password, it needs YOUR USER password. And when it say Enter new UNIX password enter the password which you set for root account.
enable root set password for root
root account is enabled. Now we need to enable login option. Run following command
sudo sh -c 'echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf'
enable root enable ghrapic command
Reboot the system and Login from root
enable root reboot command
While you logged from root account in Ubuntu 12.04 username will show Guest in notification area.
enable root root desktop
You can confirm from terminal that you logged in as root account. Open terminal and run who am i command
enable root who am i
While logged in from root account several services like google chrome, sound would not run. Please check our other articles from Ubuntu 12.04 tips and tricks to enable these services for root account.
If you wish to disable root account again follow these steps.
Reboot system Logged in from the account which you have created during the installation process
enable root normal user login screen
run following command
sudo passwd -dl root
enable root disable root
Reboot system again and try to login from root.
enable root login error with root
Enabling the Root account is rarely necessary. Almost everything you need to do as administrator of an Ubuntu system can be done via sudo or gksudo.

Linux Interview Questions For Experienced


Why should you periodically update the kernel and package versions?
To enhance the security of system you should ensure that you are using the latest versions kernel and software packages that contain the most recent security updates.
During a recent strikes at office, several archive tapes of the system were damaged and ruined. What can you do to prevent the physical damage in future?
You should store them at offsite.
Why should you avoid the Telnet to administer a Linux system remotely?
Telnet use most insecure method for communication. It send data across the network in plain text format. Someone easily find out the password using the network tool.
A file is unable to be restored from tape due to several device and media errors. What is most likely the cause?
Media errors usually indicate that the tape media is damaged, or that the tape drive heads need cleaning.
Your FTP Server recently hacked. Due to the amount of damage, the entire server needs to be restored. How should you restore the original kernel system files?
You cannot restore the entire operating system from tap back up device. So you should reinstall the core operating system, and then restore system configuration files and user data from tape backup device.
Your company hire a contract employee for two months. What should the Linux administrator do to enhance security on the employee's account?
While creating new user account for this user, administrator should set the expiration date for his account, so that if the employee leaves or does not have their contract renewed, the account will be automatically disabled.
Which backup strategy only backs up files that have changed since the last full backup?
Differential backup will backup files that have changed since the last full backup.
Name a service which should you disable on a Linux Server which is acting as both a Web and FTP Server.
The finger service should be disabled because a remote user can get important information about the system by using that command.
Why it is recommended to store backup tapes to an offsite storage facility?
Because this will prevent the backup taps from being destroyed during a natural disaster at the server site. It also prevents the tapes from being stolen.
A newbie enabled the root session for FTP server. is it ok?
No, he has put the security of entire server on risk. You should disable to root session as soon as possible.
A user complains you that he is unable to set '123' as his password. Why would not the system allow this password?
There would be a minimum length rule for password, which is blocking user to use this password. Default minimum length rule for password is six characters. It means a user cannot have password less than six characters.
Your company is running Web Server. One dedicate account holder customer complains that his visitors are able to scan the directory tree. Which directive would you configure to stop web server from listing the directory?
You should remove / comment the "Options Indexes" directive from the main configuration file ' httpd.conf' of the web server. This is a security measure so that remote users can’t scan the directory tree of the server looking for security holes. Server won’t show directory listings if requested by a user.
What type of backup strategy can you use to fully back up a system every night?
You can use full backup strategy that will always perform a full backup of all files. This takes much more time and space than other methods, but is it the most complete method and allows for easy file restoration.
How can you enhance the security of password file?
Linux keep user account information in a text file called /etc/passwd. This file also store one way encrypted password. This file is accessed by several tools to get user information, so file need to world readable. This is a security risk. To minimize the security risk you can use shadow password format. This method save account information in regular file /etc/passwd. However, the password is stored as a single "x" character (not actually stored in this file). A second file, called "/etc/shadow", contains encrypted password as well as other information such as account or password expiration values, etc. The /etc/shadow file is readable only by the root account and is therefore less of a security risk
What command should be used to make a tar archive to a disk file system located in /mnt/backup?
The correct command is tar -cvf /mnt/backup. The /mnt/backup directory should be on another machine to be fully effective as a backup strategy.
You have just finished the installation of sever. This server is going to be use as file server. Default installation have send mail service running, while this server will never send any e-mails. How should you deal with send mail service?
You should disable the send mail service if server is not being used for mail purpose. Leaving them running can increase the chance of a security vulnerability being exploited, and unauthorized use of sendmail relay.
What command can you use to back up an entire file system most efficiently?
The easiest command to use to back up an entire file system is the dump command. Files can be restored from a dump operation by using the restore command.
Which necessary steps should you take to enhance the security of server just after the initial installation?
  • Kernel and packages should be upgraded to the latest versions.
  • Unnecessary services and daemons should be disable.
  • Enable and configure firewall
  • Set a complex password policy.
While auditing user accounts, an administrator notices that one of the users has a blank password. What should he do to the account?
To prevent further use of the account, which is an immediate security risk, disable it and set a temporary password for the user for the next time they login.
Which backup strategy backs up all files that have changed since the last backup?
An incremental backup will only back up files that have changed since the last backup.
Your company has terminated a server administrator. What is first thing as an administrator should you do to enhance the security?
Because the server administrator knows the root password for the server, it should be changed immediately to prevent them from tampering with the system.
You are setting up an FTP server. Only company employees are allowed to use the FTP services. What should you configure on the FTP server to enhance security?
You should disable the anonymous FTP account, so that only users with a username and password can access the system.
What is the location of system configuration files that should be backed up on a regular basis?
The /etc directory contains most of the Linux system configuration files.
Which permission allows a user to run an executable with the permissions of the owner of that file?
The Set-User-ID is a special permission that allows a user to run an executable with the permissions of the owner of that file.
What command can you use to make a tape archive file of a /home directory, and send it to the /dev/tape device?
The correct command is tar -cvf /dev/tape /home.
The -xvf option is used to extract files from an archive.
Employees at your company are lazy in changing the password. As a system administrator what can you do to minimize the security risk?
You can setup a password policy which enforce user to change his password after a specific time periods.
Which program should you use to connect a system remotely?
You should always use SSH to connect a system remotely. SSH is a secure method that encrypts the entire session.
To save disk space, an administrator wants to backup files, and then remove them from the server permanently. What kind of backup operation is this?
An archive operation will take the files, back them up to a device, and then remove the files from the original server.
What does firewall do?
Firewall is a device or service which can be used to protect the network or system from other outside networks.

Sunday, August 10, 2014

Linux interview questions and answers

1. Which account is created on Linux installation?

- With the installation of Linux, a super user account is created called as ‘root’.

2. Which daemon tracks events on your system?

- The syslogd daemon tracks the system information and saves it to specified log files.

3. Which command would you use if you want to remove the password assigned to a group?

- gpasswd – r removes the password from the group.
- Here, the gpasswd changes the password of the group and when it is accompanied by –r, the password gets removed.

4. You wish to print a file ‘draft’ with 60 lines to a page. What command would you use?

- The command that I would use is: pr -l60 draft
- The default page length when using pr is 66 lines.
- The -l option specifies a different length.

5. Which file would you examine to determine the levels of messages written to system log files?

- kernel.h

6. You are logged on as a regular user. Without logging off and logging on as root, you are required to create a new user account immediately. How would you do it?

- This can be achieved by issuing the su command.
- This will prompt you for the password of the root account.
- Providing the password, logs you in as root. Now, you can perform any administrative duties. .

7. You are required to restore the file memo.ben. It was backed up in the tar file MyBackup.tar. Which command would you use to do it?

- The command that we would use is: tar xf MyBackup.tar memo.ben
- It uses the x switch to extract a file.

8. What is partial backup?

- When you select only a portion of your file hierarchy or a single partition to back up, it is called partial back up.

9. What is the fastest way to enter a series of commands from the command-line?

- Write the commands, each separated by a semi-colon. Press enter after the last command.
- The semi-colon would inform the shell that multiple commands are being entered at the command line, to be executed serially.

10. What are the qualities of soft links?

a.) Soft link files have different inode numbers than source file
b.) The soft link file will be of no use if original file is deleted.
c.) Soft links are not updated
d.) They can create links between directories
e.) They can cross file system boundaries

11. Differentiate between Cron and Anacron.

a.) Minimum granularity with Cron is minute while it is in days with Anacron.
b.) Cron job can be scheduled by any normal user while Anacron can be scheduled only by the super user.
c.) Cron expects the system to be up and running while the Anacron doesn’t expect the system to be up and running all the time. In case of anacron if a job is scheduled and the system is down that time, it will execute the job as soon as the system is up and running.
d.) Cron is ideal for servers while Anacron is ideal for desktops and laptops.
e. ) Cron should be used when you want a job to be executed at a particular hour and minute while Anacron should be used in when the job can be executed irrespective of the hour and minute.

12.) What is an INODE?

- It is a structure which has the description of all the files and pointers to the data blocks of file stored in it.
- The information contained is file-size, access and modification time, permission and so on.

13. Which command is used to check the number of files and disk space used and the each user’s defined quota?

repquota command is used to check the status of the user’s quota along with the disk space and number of files used. This command gives a summary of the user’s quota that how much space and files are left for the user. Every user has a defined quota in Linux. This is done mainly for the security, as some users have only limited access to files. This provides a security to the files from unwanted access. The quota can be given to a single user or to a group of users.

14. What is the name and path of the main system log?

By default the main system log is /var/log/messages. This file contains all the messages and the script written by the user. By default all scripts are saved in this file. This is the standard system log file, which contains messages from all system software, non-kernel boot issues, and messages that go to 'dmesg'. dmesg is a system file that is written upon system boot.

16. How secured is Linux? Explain.

Security is the most important aspect of an operating system. Due to its unique authentication module, Linux is considered as more secured than other operating systems. Linux consists of PAM. PAM is Pluggable Authentication Modules. It provides a layer between applications and actual authentication mechanism. It is a library of loadable modules which are called by the application for authentication. It also allows the administrator to control when a user can log in. All PAM applications are configured in the directory "/etc/pam.d" or in a file "/etc/pam.conf". PAM is controlled using the configuration file or the configuration directory.

17. Can Linux computer be made a router so that several machines may share a single Internet connection? How?

Yes a Linux machine can be made a router. This is called "IP Masquerade." IP Masquerade is a networking function in Linux similar to the one-to-many (1: Many) NAT (Network Address Translation) servers found in many commercial firewalls and network routers. The IP Masquerade feature allows other "internal" computers connected to this Linux box (via PPP, Ethernet, etc.) to also reach the Internet as well. Linux IP Masquerading allows this functionality even if the internal computers do not have IP addresses.
The IP masquerading can be done by the following steps:

1. The Linux PC must have an internet connection and a connection to LAN. Typically, the Linux PC has two network interfaces-an Ethernet card for the LAN and a dial-up PPP connection to the Internet (through an ISP).

2. All other systems on your LAN use the Linux PC as the default gateway for TCP/IP networking. Use the same ISP-provided DNS addresses on all systems.

3. Enable IP forwarding in the kernel. By default the IP forwarding is not enabled. To ensure that IP forwarding is enabled when you reboot your system, place this command in the /etc/rc.d/rc.local file.

4. Run /sbin/iptables-the IP packet filter administration program-to set up the rules that enable the Linux PC to masquerade for your LAN.

18. What is the minimum number of partitions you need to install Linux?

Minimum 2 partitions are needed for installing Linux. The one is / or root which contains all the files and the other is swap. Linux file system is function specific which means that files and folders are organized according to their functionality. For example, all executables are in one folder, all devices in another, all libraries in another and so on. / or ‘root’ is the base of this file system. All the other folders are under this one. / can be consider as C: .Swap is a partition that will be used as virtual memory. If there is no more available RAM a Linux computer will use an area of the hard disk, called swap, to temporarily store data. In other words it is a way of expanding your computers RAM.

19. Which command is used to review boot messages?

dmesg command is used to review boot messages. This command will display system messages contained in the kernel ring buffer. We can use this command immediately after booting to see boot messages. A ring buffer is a buffer of fixed size for which any new data added to it overwrites the oldest data in it. Its basic syntax is

dmesg [options]

Invoking dmesg without any of its options causes it to write all the kernel messages to standard output. This usually produces far too many lines to fit into the display screen all at once, and thus only the final messages are visible. However, the output can be redirected to the less command through the use of a pipe, thereby allowing the startup messages to be viewed on one screen at a time
dmesg | less

20. Which utility is used to make automate rotation of a log?

logrotate command is used to make automate rotation of log.
Syntax of the command is:
logrotate [-dv] [-f|] [-s|] config_file+
It allows automatic rotation, compression, removal, and mailing of log files. This command is mainly used for rotating and compressing log files. This job is done every day when a log file becomes too large. This command can also be run by giving on command line. We can done force rotation by giving –f option with this command in command line. This command is also used for mailing. We can give –m option for mailing with this command. This option takes two arguments one is subject and other is recipient name.

21. What are the partitions created on the mail server hard drive?

The main partitions are done firstly which are root, swap and boot partition. But for the mail server three different partitions are also done which are as follows:
1. /var/spool- This is done so that if something goes wrong with the mail server or spool than the output cannot overrun the file system.
2. /tmp- putting this on its own partition prevents any user item or software from overrunning the system files.
3. /home- putting this on its own is useful for system upgrades or reinstalls. It allow not to wipe off the /home hierarchy along with other areas.

22. What are the fields in the/etc/passwd file?

It contains all the information of the users who log into the system. It contains a list of the system's accounts, giving for each account some useful information like user ID, group ID, home directory, shell, etc. It should have general read permission as many utilities, like ls use it to map user IDs to user names, but write access only for the superuser (root). The main fields of /etc/passwd file are:
1. Username: It is used when user logs in. It should be between 1 and 32 characters in length.
2. Password: An x character indicates that encrypted password is stored in /etc/shadow file.
3. User ID (UID): Each user must be assigned a user ID (UID). UID 0 (zero) is reserved for root and UIDs 1-99 are reserved for other predefined accounts. Further UID 100-999 are reserved by system for administrative and system accounts/groups.
4. Group ID (GID): The primary group ID (stored in /etc/group file)
5. User ID Info: The comment field. It allow you to add extra information about the users such as user's full name, phone number etc. This field use by finger command.
6. Home directory: The absolute path to the directory the user will be in when they log in. If this directory does not exists then users directory becomes /
7. Command/shell: The absolute path of a command or shell (/bin/bash). Typically, this is a shell.

23. Which commands are used to set a processor-intensive job to use less CPU time?

nice command is used for changing priority of the jobs.
Syntax: nice [OPTION] [COMMAND [ARG]...]
Range of priority goes from -20 (highest priority) to 19 (lowest).Priority is given to a job so that the most important job is executed first by the kernel and then the other least important jobs. This takes less CPU times as the jobs are scheduled and are given priorities so the CPU executes fast. The priority is given by numbers like -20 describe the highest priority and 19 describe the least priority.

24. How to change window manager by editing your home directory?

/.xinitrc file allows changing the window manager we want to use when logging into X from that account. The dot in the file name shows you that the file is a hidden file and doesn't show when you do a normal directory listing. For setting a window manager we have to save a command in this file. The syntax of command is: exec windowmanager.After this, save the file. Next time when you run a startx a new window manager will open and become default. The commands for starting some popular window managers and desktop environments are:
-KDE = startkde
-Gnome = gnome-session
-Blackbox = blackbox
-FVWM = fvwm
-Window Maker = wmaker
-IceWM = icewm

25. How documentation of an application is stored?

When a new application is installed its documentation is also installed. This documentation is stored under the directory named for application. For example if my application name is App1 then the path of the documentation will be /user/doc/App1. It contains all the information about the application. It contains date of creating application, name of application and other important module of the application. We can get the basic information of application from the documentation.

26. How shadow passwords are given?

pwconv command is used for giving shadow passwords. Shadow passwords are given for better system security. The pwconv command creates the file /etc/shadow and changes all passwords to ‘x’ in the /etc/passwd file. First, entries in the shadowed file which don't exist in the main file are removed. Then, shadowed entries which don't have `x' as the password in the main file are updated. Any missing shadowed entries are added. Finally, passwords in the main file are replaced with `x'. These programs can be used for initial conversion as well to update the shadowed file if the main file is edited by hand.

27. How do you create a new user account?

useradd command is used for creating a new user account. When invoked without the
-D option, the useradd command creates a new user account using the values specified on the command line and the default values from the system. The new user account will be entered into the system files as needed, and initial files copied, depending on the command line options. This command uses the system default as home directory. If –m option is given then the home directory is made.

28. Which password package is installed for the security of central password?

Shadow password packages are used for security of central passwords. Security is the most important aspect of every operating system. When this package is not installed the user information including passwords is stored in the /etc/passwd file. The password is stored in an encoded format. These encoded forms can be easily identified by the System crackers by randomly encoding the passwords from dictionaries. The Shadow Package solves the problem by relocating the passwords to another file (usually /etc/shadow). The /etc/shadow file is set so that it cannot be read by just anyone. Only root will be able to read and write to the /etc/shadow file.

29. Which shell do you assign to a POP3 mail-only account?

POP3 mail only account is assigned to the /bin/false shell. However, assigning bash shell to a POP3 mail only gives user login access, which is avoided. /bin/nologin can also be used. This shell is provided to the user when we don’t want to give shell access to the user. The user cannot access the shell and it reject shell login on the server like on telnet. It is mainly for the security of the shells. POP3 is basically used for downloading mail to mail program. So for illegal downloading of emails on the shell this account is assigned to the /bin/false shell or /bin/nologin. These both shells are same they both do the same work of rejecting the user login to the shell. The main difference between these two shells is that false shell shows the incorrect code and any unusual coding when user login with it. But the nologin shell simply tells that no such account is available. So nologin shell is used mostly in Linux.

30. Which daemon is responsible for tracking events on Linux system?

syslogd is responsible for tracking system information and save it to the desired log files. It provides two system utilities which provide system logging and kernel message trapping. Internet and UNIX domain sockets support enable this utility package to support both local and remote logging. Every logged message contains at least a time and a hostname field, normally a program name field, too. So to track these information this daemon is used. syslogd mainly reacts to the set of signals given by the user. These are the signals given to syslogd: SIGHUP: This lets syslogd perform a re-initialization. All open files are closed, the configuration file (default is /etc/syslog.conf) will be reread and the syslog facility is started again. SIGTERM: The syslogd will die. SIGINT, SIGQUIT: If debugging is enabled these are ignored, otherwise syslogd will die. SIGUSR1: Switch debugging on/off. This option can only be used if syslogd is started with the - d debug option. SIGCHLD: Wait for Childs if some were born, because of waiting messages.

31. Which daemon is used for scheduling of the commands?

The crontab command is used for scheduling of the commands to run at a later time. SYNTAX
crontab [ -u user ] file
crontab [ -u user ] { -l | -r | -e }

Options
-l List - display the current crontab entries.

-r Remove the current crontab.

-e Edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables.
When user exits from the editor, the modified crontab will be installed automatically. Each user can have their own crontab, and though these are files in /var, they are not intended to be edited directly. If the –u option is given than the crontab gives the name of the user whose crontab is to be tweaked. If it is given without this then it will display the crontab of the user who is executing the command.

32. How environment variable is set so that the file permission can be automatically set to the newly created files?

umask command is used to set file permission on newly created files automatically.
Syntax
umask [-p] [-S] [mode]
It is represented in octal numbers. We can simply use this command without arguments to see the current file permissions. To change the permissions, mode is given in the arguments. The default umask used for normal user is 0002. The default umask for the root user is 0022. For calculating the original values, the values shown by the umask must be subtracted by the default values. It is mainly used for masking of the file and directory permission. The /etc/profile script is where the umask command is usually set for all users. The –S option can be used to see the current default permissions displayed in the alpha symbolic format.
For example, umask 022 ensures that new files will have at most 755 permissions (777 NAND 022).
The permissions can be calculated by taking the NAND of original value with the default values of files and directories.


What is Linux and why is it so popular?
Answer - Linux is an operating system that uses UNIX like Operating system.......
Unix interview questions with answers
Discuss the mount and unmount system calls, What are the process states in Unix?, What is use of sed command?, What is 'inode'?,What are the Unix system calls for I/O?, How are devices represented in UNIX?, Brief about the directory representation in UNIX ......
What is LILO? 
Answer - LILO is Linux Loader is a boot loader for Linux. It is used to load Linux into the memory and start the Operating system.......
What is the difference between home directory and working directory?
Answer - Home directory is the default working directory when a user logs in. On the other hand, working directory is the user’s current directory.......
What is the difference between internal and external commands?
Answer - Internal commands are commands that are already loaded in the system. They can be executed any time and are independent.......
Explain the difference between a static library and a dynamic library.
Answer - Static libraries are loaded when the program is compiled and dynamically-linked libraries are loaded in while......
What is LD_LIBRARY_PATH?
Answer - LD_LIBRARY_PATH is an environment variable. It is used for debugging a new library or a non standard library.......
What is the file server in Linux server?
Answer - File server is used for file sharing. It enables the processes required fro sharing.......

What is NFS? What is its purpose?

Answer - NFS is Network File system. It is a file system used for sharing of files over a network.......

How do I send email with linux?

Answer - Email can be sent in Linux using the mail command. ......

Explain RPM (Red Hat Package Manager) features.

Answer - RPM is a package managing system (collection of tools to manage software packages).......

What is Kernel? Explain the task it performs.

Answer - Kernel is used in UNIX like systems and is considered to be the heart of the operating system.......

What is Linux Shell? What is Shell Script?

Answer - Linux shell is a user interface used for executing the commands. Shell is a program the user......

What are Pipes? Explain use of pipes.

Answer - A pipe is a chain of processes so that output of one process (stdout) is fed an input (stdin) to another.......

Explain trap command; shift Command, getopts command of linux.

Answer - Trap command: controls the action to be taken by the shell when a signal is received. ......

What Stateless Linux server? What feature it offers?

Answer - A stateless Linux server is a centralized server in which no state exists on the single workstations. ......

What does nslookup do? Explain its two modes.

Answer - Nslookup is used to find details related to a Domain name server. Details like IP addresses of a machine, MX records,......

What is Bash Shell?

Answer - Bash is a free shell for UNIX. It is the default shell for most UNIX systems. It has a combination of the C and Korn shell features. ......

Explain some Network-Monitoring Tools in Linux: ping, traceroute, tcpdump, ntop

Answer - Network monitoring tools are used to monitor the network, systems present on the network, traffic etc.......

How does the linux file system work?

Answer - Linux file structure is a tree like structure. It starts from the root directory, represented by '/', and then expands into sub-directories.......

What are the process states in Linux?

Answer - Process states in Linux.......

What is a zombie?

Answer - Zombie is a process state when the child dies before the parent process. In this case the structural information of the process is still in the process table.......

Explain each system calls used for process management in linux.

Answer - System calls used for Process management

Computer Networking Interview Question and Answer


1. Define Network?
A network is a set of devices connected by physical media links. A network is recursively is a connection of two or more nodes by a physical link or two or more networks connected by one or more nodes.

2. What is a Link?
At the lowest level, a network can consist of two or more computers directly connected by some physical medium such as coaxial cable or optical fiber. Such a physical medium is called as Link.


3. What is a node?
A network can consist of two or more computers directly connected by some physical medium such as coaxial cable or optical fiber. Such a physical medium is called as Links and the computer it connects is called as Nodes.

4. What is a gateway or Router?
A node that is connected to two or more networks is commonly called as router or Gateway. It generally forwards message from one network to another.

5. What is point-point link?
If the physical links are limited to a pair of nodes it is said to be point-point link.

6. What is Multiple Access?
If the physical links are shared by more than two nodes, it is said to be Multiple Access.

7. What are the advantages of Distributed Processing?
a. Security/Encapsulation
b. Distributed database
c. Faster Problem solving
d. Security through redundancy
e. Collaborative Processing


16. Define Routing?
The process of determining systematically hoe to forward messages toward the destination nodes based on its address is called routing.

17. What is a peer-peer process?
The processes on each machine that communicate at a given layer are called peer-peer process.

18. When a switch is said to be congested?
It is possible that a switch receives packets faster than the shared link can accommodate and stores in its memory, for an extended period of time, then the switch will eventually run out of buffer space, and some packets will have to be dropped and in this state is said to congested state.


20. What is Round Trip Time?
The duration of time it takes to send a message from one end of a network to the other and back, is called RTT.

21. Define the terms Unicasting, Multiccasting and Broadcasting?
If the message is sent from a source to a single destination node, it is called Unicasting.
If the message is sent to some subset of other nodes, it is called Multicasting.
If the message is sent to all the m nodes in the network it is called Broadcasting.

22. What is Multiplexing?
Multiplexing is the set of techniques that allows the simultaneous transmission of multiple signals across a single data link.

23. Name the categories of Multiplexing?
a. Frequency Division Multiplexing (FDM)
b. Time Division Multiplexing (TDM)
   i. Synchronous TDM
   ii. ASynchronous TDM Or Statistical TDM.
c. Wave Division Multiplexing (WDM)

24. What is FDM?
FDM is an analog technique that can be applied when the bandwidth of a link is greater than the combined bandwidths of the signals to be transmitted.

25. What is WDM?
WDM is conceptually the same as FDM, except that the multiplexing and demultiplexing involve light signals transmitted through fiber optics channel.

26. What is TDM?
TDM is a digital process that can be applied when the data rate capacity of the transmission medium is greater than the data rate required by the sending and receiving devices.

27. What is Synchronous TDM?
In STDM, the multiplexer allocates exactly the same time slot to each device at all times, whether or not a device has anything to transmit.

28. List the layers of OSI
a. Physical Layer
b. Data Link Layer
c. Network Layer
d. Transport Layer
e. Session Layer
f. Presentation Layer
g. Application Layer

29. Which layers are network support layers?
a. Physical Layer
b. Data link Layer and 
c. Network Layers

30. Which layers are user support layers?
a. Session Layer
b. Presentation Layer and 
c. Application Layer

31. Which layer links the network support layers and user support layers?
The Transport layer links the network support layers and user support layers.

32. What are the concerns of the Physical Layer?
Physical layer coordinates the functions required to transmit a bit stream over a physical medium.
a. Physical characteristics of interfaces and media
b. Representation of bits
c. Data rate
d. Synchronization of bits
e. Line configuration
f. Physical topology
g. Transmission mode

33. What are the responsibilities of Data Link Layer?
The Data Link Layer transforms the physical layer, a raw transmission facility, to a reliable link and is responsible for node-node delivery.
a. Framing
b. Physical Addressing
c. Flow Control
d. Error Control
e. Access Control

34. What are the responsibilities of Network Layer?
The Network Layer is responsible for the source-to-destination delivery of packet possibly across multiple networks (links).
a. Logical Addressing
b. Routing

35. What are the responsibilities of Transport Layer?
The Transport Layer is responsible for source-to-destination delivery of the entire message.
a. Service-point Addressing
b. Segmentation and reassembly
c. Connection Control
d. Flow Control
e. Error Control

36. What are the responsibilities of Session Layer?
The Session layer is the network dialog Controller. It establishes, maintains and synchronizes the interaction between the communicating systems.
a. Dialog control
b. Synchronization

37. What are the responsibilities of Presentation Layer?
The Presentation layer is concerned with the syntax and semantics of the information exchanged between two systems.
a. Translation
b. Encryption
c. Compression

38. What are the responsibilities of Application Layer?
The Application Layer enables the user, whether human or software, to access the network. It provides user interfaces and support for services such as e-mail, shared database management and other types of distributed information services.
a. Network virtual Terminal
b. File transfer, access and Management (FTAM)
c. Mail services
d. Directory Services

39. What are the two classes of hardware building blocks?
Nodes and Links.

40. What are the different link types used to build a computer network?
a. Cables
b. Leased Lines
c. Last-Mile Links
d. Wireless Links

41. What are the categories of Transmission media?
a. Guided Media
  i. Twisted - Pair cable
    1. Shielded TP
    2. Unshielded TP
  ii. Coaxial Cable
  iii. Fiber-optic cable
b. Unguided Media
  i. Terrestrial microwave
  ii. Satellite Communication

42. What are the types of errors?
a. Single-Bit error
  In a single-bit error, only one bit in the data unit has changed
b. Burst Error
  A Burst error means that two or more bits in the data have changed.

43. What is Error Detection? What are its methods?
Data can be corrupted during transmission. For reliable communication errors must be deducted and Corrected. Error Detection uses the concept of redundancy, which means adding extra bits for detecting errors at the destination. The common Error Detection methods are 
  a. Vertical Redundancy Check (VRC)
  b. Longitudinal Redundancy Check (VRC)
  c. Cyclic Redundancy Check (VRC)
  d. Checksum

44. What is Redundancy?
The concept of including extra information in the transmission solely for the purpose of comparison. This technique is called redundancy.

45. What is VRC?
It is the most common and least expensive mechanism for Error Detection. In VRC, a parity bit is added to every data unit so that the total number of 1s becomes even for even parity. It can detect all single-bit errors. It can detect burst errors only if the total number of errors in each data unit is odd.

46. What is LRC?
In LRC, a block of bits is divided into rows and a redundant row of bits is added to the whole block. It can detect burst errors. If two bits in one data unit are damaged and bits in exactly the same positions in another data unit are also damaged, the LRC checker will not detect an error. In LRC a redundant data unit follows n data units.

47. What is CRC?
CRC, is the most powerful of the redundancy checking techniques, is based on binary division.

48. What is Checksum?
Checksum is used by the higher layer protocols (TCP/IP) for error detection

49. List the steps involved in creating the checksum.
a. Divide the data into sections
b. Add the sections together using 1's complement arithmetic
c. Take the complement of the final sum, this is the checksum.