Linux Interview Questions - Part 6





1.What are Daemons ??

Daemons are services that provide several functions that may not be available under the base operating system. 
Its main task is to listen for service request and at the same time to act on these requests. After the service is done, 
it is then disconnected and waits for further requests.

2.What are environmental variables?

Environmental variables are global settings that control the shell’s function as well as that of other Linux programs. 
Another common term for environmental variables is global shell variables

3.What are the different modes when using vi editor?

There are 3 modes under vi:
- Command mode – this is the mode where you start in
- Edit mode – this is the mode that allows you to do text editing
- Ex mode – this is the mode wherein you interact with vi with instructions to process a file

4.How can we change speed and make full duplex settings for eth0

Ans We can do this with below given 2 methods:

ethtool -s eth0 speed 100 duplex full
ethtool -s eth0 speed 10 duplex half

OR

mii-tool -F 100baseTx-HD
mii-tool -F 10baseT-HD


5.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 process is dead but have not been removed from the process table.


6.Explain /proc filesystem?

/proc is a virtual filesystem that provides detailed information about Linux kernel, hardware’s and running processes. Files under /proc directory named as Virtual files. 
Because /proc contains virtual files that’s why it is called virtual file system. These virtual files have unique qualities. 

Most of them are listed as zero bytes in size. Virtual files such as /proc/interrupts, /proc/meminfo, /proc/mounts, and /proc/partitions provide an up-to-the-moment glimpse of the system's hardware. Others, like the /proc/filesystems file and the /proc/sys/ directory provide system configuration information and interfaces.


7.What is the difference between hardware RAID and Software RAID?

The hardware-based RAID is independent from the host. A Hardware RAID device connects to the SCSI controller and presents the RAID arrays as a single SCSI drive. 

An external RAID system moves all RAID handling "intelligence" into a controller located in the external disk subsystem. The whole subsystem is connected to the host via a normal SCSI controller and appears to the host as a single disk.

Software RAID is implemented under OS Kernel level. The Linux kernel contains an MD driver that allows the RAID solution to be completely hardware independent.

 The performance of a software-based array depends on the server CPU performance and load.

8.What is the difference between cron and anacron

Ans  Cron :
                     1) Minimum granularity is minute (i.e Jobs can be scheduled to be executed
                         every minute)
                     2) Cron job can be scheduled by any normal user ( if not restricted by super
                          user )
                     3) Cron expects system to be running 24 x 7. If a job is scheduled, and
                         system is down during that time, job is not executed
                     4) Ideal for servers
                     5) Use cron when a job has to be executed at a particular hour and minute

      Anacron :
                     1) Minimum granularity is only in days
                     2) Anacron can be used only by super user ( but there are workarounds to
                         make it usable by normal user )
                     3) Anacron doesn’t expect system to be running 24 x 7. If a job is scheduled,
                         and system is down during that time, it start the jobs when the system
                         comes back up.
                     4) Ideal for desktops and laptops
                     5) Use anacron when a job has to be executed irrespective of hour and
                          minute


9.What is CUPS?

CUPS stands for "Common UNIX Printing System". CUPS is a open source printing system developed by Apple Inc. CUPS uses the Internet Printing Protocol (IPP) to allow local printing and print sharing.
The log files for the CUPS printing system are located in the /var/log/cups/ directory.

10.How Many Run Levels present in Linux?

There are 7 run levels, with each having its own properties.
- 0: Halt the system
- 1: Single-user mode 
- 2: Not used
- 3: Multi-user mode with text login
- 4: Not used
- 5: Multi-user mode with graphical login
- 6: Reboot



Post a Comment

2 Comments

  1. اما ممکن است این سوال به ذهنتان بیاید که یک خرید هاست خرید هاست اشتراکی ارزان ارزان چه هاستی است و چه ویژگی هایی باید دارا باشد در ادامه مقاله قصد داریم ویژگی های هاست ارزان را خرید هاست لینوکس ماهانه معرفی کنیم و در آخر به معرفی بهترین هاست ایران از میان هاستینگ های برتر کشور بپردازیم .اگر قصد راه اندازی یک سایت باکیفیت و پر بازدید را دارید حتما باید نکته هایی را رعایت نمایید قسمت سخت افزار از انتخاب ها تشکیل می شود و مناسب برای سایت هست که به سرور استفاده شده با هاست ارزان برای وردپرس سی پی یو ، رم و استفاده از دیگر سخت افزارها هاست ارزان خارجی با ویژگی های عنوان شده مربوط می شود .نرم افراز به دو بخش جدا تقسیم می شود که بخشی از آن به هاست و سرور مربوط هست و بخش دیگر به سیستم مدیریت محتوا سایت شما بستگی دارد .و در نهایت بخش محتوا هاست پرسرعت ارزان ارتباط با کار سئو و بهینه سازی سایت برای موتورهای جستجو و هم چنین بازاریابی از طریق محتوا است .در حقیقت هاست یک بستر الکترونیکی هست که محتویات و مطالب سایت شما داخل آن ذخیره خواهد شد .و این محتویات هاست ارزان قیمت همان فایل و دیتابیس شما است که از طریق اتصال اینترنتی کاربران به سرور در دسترس خواهد بود .لازم است که هاست و دامنه به یک دیگر متصل باشند که این فرآیند از طریق Name server صورت می گیرد .بدین ترتیب اولین کاری که بعد از خرید هاست از شرکت های معتبر هاستینگ باید انجام دهید این هست که نیم سرور های هاست را بر روی دامنه خودتان ست کنید تا نهایتا بعد از گذشت ۷۲ ساعت هاست و دامنه به هم دیگر متصل شوند

    ReplyDelete