Vagrant Interview Questions And Answers 2018

Vagrant Interview Questions And Answers 2018. Here Coding compiler sharing a list of 30 Vagrant interview questions for Devops. These Vagrant questions will help you to crack your next Vagrant Devops job interview.

Vagrant Interview Questions

  1. What is Vagrant?
  2. Vagrant is written in which language?
  3. What is a BOX in Vagrant?
  4. What is Provider in Vagrant?
  5. What is Provisioner in Vagrant?
  6. What are the subcommands associated with Box command?
  7. Explain Box Add Command in Vagrant?
  8. What is Box List command in Vagrant?
  9. What is Box Outdated command in Vagrant?
  10. What is Box Prune command in Vagrant?

Vagrant Interview Questions And Answers

1) What is Vagrant?

A) Vagrant is an open-source software product for building and maintaining portable virtual software development environments, e.g. for VirtualBox, Hyper-V, Docker, VMware, and AWS.

2) Vagrant is written in which language?

A) Vagrant is written in Ruby language.

3) What is a BOX in Vagrant?

A) A box is a packaged Vagrant environment, typically a virtual machine.

4) What is Provider in Vagrant?

A) A provider is the location in which the virtual environment runs. It can be local (the default is to use VirtualBox), remote, or even a special case like a Docker container.

5) What is Provisioner in Vagrant?

A) A provisioner is a tool to set up the virtual environment, and can be as simple as a shell script, but alternatively a more advanced tool like Chef, Puppet, or Ansible can be used.

6) What are the subcommands associated with Box command?

A) Box command used to manage (add, remove, etc.) boxes.

Command: vagrant box

The main functionality of this command is exposed via even more subcommands:

  • add
  • list
  • outdated
  • prune
  • remove
  • repackage
  • update

7) Explain Box Add Command in Vagrant?

A) Command: vagrant box add ADDRESS

This adds a box with the given address to Vagrant.

8) What is Box List command in Vagrant?

A) Command: vagrant box list

This command lists all the boxes that are installed into Vagrant.

9) What is Box Outdated command in Vagrant?

A) Command: vagrant box outdated

This command tells you whether or not the box you are using in your current Vagrant environment is outdated.

10) What is Box Prune command in Vagrant?

A) Command: vagrant box prune

This command removes old versions of installed boxes. If the box is currently in use vagrant will ask for confirmation.

Vagrant DevOps Interview Questions

11) What is Box Remove command in Vagrant?

A) Command: vagrant box remove NAME

This command removes a box from Vagrant that matches the given name.

12) What is Box Repackage command in Vagrant?

A) Command: vagrant box repackage NAME PROVIDER VERSION

This command repackages the given box and puts it in the current directory so you can redistribute it. The name, provider, and version of the box can be retrieved using vagrant box list.

13) What is Box Update command in Vagrant?

A) Command: vagrant box update

This command updates the box for the current Vagrant environment if there are updates available.

14) What is Connect command in Vagrant?

A) Command: vagrant connect NAME

The connect command complements the share command by enabling access to shared environments.

15) Destroy command in Vagrant

A) Command: vagrant destroy [name|id]

16) Global Status command in Vagrant

A) Command: vagrant global-status

17) What is Vagrant Share?

A) Vagrant Share allows you to share your Vagrant environment with anyone in the world, enabling collaboration directly in your Vagrant environment in almost any network environment with just a single command: vagrant share.
This command will tell you the state of all active Vagrant environments on the system for the currently logged in user.
This command stops the running machine Vagrant is managing and destroys all resources that were created during the machine creation process.

18) What is Vagrantfile?

A) The primary function of the Vagrantfile is to describe the type of machine required for a project, and how to configure and provision these machines.

19) What is Provisioning in Vagrant?

A) Provisioners in Vagrant allow you to automatically install software, alter configurations, and more on the machine as part of the vagrant up process.

20) What are Synced Folders in Vagrant?

A) Synced folders enable Vagrant to sync a folder on the host machine to the guest machine, allowing you to continue working on your project’s files on your host machine, but use the resources in the guest machine to compile or run your project.

Vagrant Tool Interview Questions And Answers

21) What is Multi-Machine environment in Vagrant?

A) Vagrant is able to define and control multiple guest machines per Vagrantfile. This is known as a “multi-machine” environment.

These machines are generally able to work together or are somehow associated with each other. Here are some use-cases people are using multi-machine environments for today:

Accurately modeling a multi-server production topology, such as separating a web and database server.
Modeling a distributed system and how they interact with each other.
Testing an interface, such as an API to a service component.
Disaster-case testing: machines dying, network partitions, slow networks, inconsistent world views, etc.

22) How do you define multiple machines in Vagrant?

A) Multiple machines are defined within the same project Vagrantfile using the config.vm.define method call.

23) What are Providers in Vagrant?

A) While Vagrant ships out of the box with support for VirtualBox, Hyper-V, and Docker, Vagrant has the ability to manage other types of machines as well. This is done by using other providers with Vagrant.

24) What are Plugins in Vagrant and how they assist?

A) Vagrant comes with many great features out of the box to get your environments up and running. Sometimes, however, you want to change the way Vagrant does something or add additional functionality to Vagrant. This can be done via Vagrant plugins.

25) What is Vagrant Push?

A) Vagrant is capable of deploying or “pushing” application code in the same directory as your Vagrantfile to a remote such as an FTP server.

Pushes are defined in an application’s Vagrantfile and are invoked using the vagrant push subcommand.

26) What is vagrant in DevOps?
A) DevOps is a lot more than configuration management.  Vagrant is another tool to help your organization transition to a DevOps culture. Vagrant also helps improve your entire workflow of using Puppet, improving development and process for both developers and operations.
27) What is a vagrant image?
A) The Vagrantfile has some information that will be merged into your Vagrantfile that is created when you run vagrant init boxname in a folder. The box-disk.vmdk is the virtual hard disk drive. The box.ovf defines the virtual hardware for thebox.
28) What is vagrant Linux?
A) Vagrant manages virtual machines hosted in Oracle VirtualBox, a full x86 virtualizer that is also open source (GPLv2). A virtual machine is a software implementation of a computer, running a complete operating system stack on a virtualizer. It is a full implementation of a computer with a virtual disk, memory and CPU.
29) What is vagrant virtualbox?
A) Vagrant comes with support out of the box for VirtualBox, a free, cross-platform consumer virtualization product. VirtualBox can be installed by downloading a package or installer for your operating system and using standard procedures to install that package.
30) What is Ansible and vagrant?
A) Vagrant is a tool to manage virtual machine environments, and allows you to configure and use reproducible work environments on top of various virtualization and cloud platforms. It also has integration with Ansible as a provisioner for these virtual machines, and the two tools work together well.

OTHER INTERVIEW QUESTIONS

  1. 60 Java Multiple Choice Questions
  2. 40 Core Java MCQ Questions
  3. Anaplan Interview Questions And Answers
  4. Tableau Multiple Choice Questions
  5. Python Coding Interview Questions
  6. CSS3 Interview Questions
  7. Linux Administrator Interview Questions
  8. SQL Interview Questions
  9. Hibernate Interview Questions
  10. Kubernetes Interview Questions
  11. Kibana Interview Questions
  12. Nagios Interview Questions
  13. Jenkins Interview Questions
  14. Chef Interview Questions
  15. Puppet Interview Questions
  16. RPA Interview Questions And Answers
  17. Android Interview Questions
  18. Mulesoft Interview Questions
  19. JSON Interview Questions
  20. PeopleSoft HRMS Interview Questions
  21. PeopleSoft Functional Interview Questions
  22. PeopleTools Interview Questions
  23. Peoplesoft Technical Interview Questions
  24. 199 Peoplesoft Interview Questions
  25. 200 Blue Prism Interview Questions
  26. Visualforce Interview Questions
  27. Salesforce Interview Questions
  28. 300 SSIS Interview Questions
  29. PHP Interview Questions And Answers
  30. Alteryx Interview Questions
  31. AWS Cloud Support Interview Questions
  32. Google Kubernetes Engine Interview Questions
  33. AWS Devops Interview Questions

Core Java Multiple Choice Questions With Answers 2018

Core Java Multiple Choice Questions With Answers 2018. Here Coding compiler sharing a list of 40 Java Objective Questions and Answers for freshers and experienced Java developers. We hope that these Java MCQ Questions will help you to crack your next Java interview. All the best for your future and happy Java learning.

Core Java Multiple Choice Questions

1) A process that involves recognizing and focusing on the important characteristics of a situation or object is known as:

(a) Encapsulation (b) Polymorphism
(c) Abstraction (d) Inheritance
(e) Object persistence.

A) c

2) Which statement is true regarding an object?

(a) An object is what classes instantiated are from
(b) An object is an instance of a class
(c) An object is a variable
(d) An object is a reference to an attribute
(e) An object is not an instance of a class.

A) b

3) In object-oriented programming, composition relates to

(a) The use of consistent coding conventions
(b) The organization of components interacting to achieve a coherent, common behavior
(c) The use of inheritance to achieve polymorphic behavior
(d) The organization of components interacting not to achieve a coherent common behavior
(e) The use of data hiding to achieve polymorphic behavior.

A) b

4) In object-oriented programming, new classes can be defined by extending existing classes. This is an example of:

(a) Encapsulation (b) Interface
(c) Composition (d) Inheritance (e) Aggregation.

A) d

5) Which of the following does not belong: If a class inherits from some other class, it should

(a) Make use of the parent class’s capabilities
(b) Over-ride or add the minimum to accomplish the derived class’ purpose
(c) Over-ride all the methods of its parent class
(d) Make sure the result “IS-A-KIND-OF” its base class
(e) Make sure the result “contains” its base class.

A) c

6) Object-oriented inheritance models the

(a) “is a kind of” relationship
(b) “has a” relationship
(c) “want to be” relationship
(d) inheritance does not describe any kind of relationship between classes
(e) “contains” of relationship.

A) a

7) The wrapping up of data and functions into a single unit is called

(a) Encapsulation (b) Abstraction
(c) Data Hiding (d) Polymorphism (e) Message passing.

A) a

8) Polymorphism

(a) Is not supported by Java
(b) Refers to the ability of two or more objects belonging to different classes to respond to exactly the same message in different class-specific ways
(c) Simplifies code maintenance
(d) Not simplifies code maintenance
(e) Refers to the ability of two or more objects belonging to different classes to respond to exactly the same message in different class-specific ways and simplifies code maintenance.

A) e

9) In object-oriented programming, new classes can be defined by extending existing classes. This is an example of:

(a) Encapsulation (b) Interface (c) Composition
(d) Inheritance (e) Aggregation.

A) d

10) Given a class named student, which of the following is a valid constructor declaration for the class?

(a) Student (student s) { } (b) Student student ( ) { }
(c) Private final student ( ) { } (d) Void student ( ) { }
(e) Static void student(){ }.

A) a

Core Java Multiple Choice Questions With Answers

11) What is garbage collection in the context of Java?

(a) The operating system periodically deletes all of the java files available on the system.
(b) Any package imported in a program and not used is automatically deleted.
(c) When all references to an object are gone, the memory used by the object is automatically reclaimed.
(d) The JVM checks the output of any Java program and deletes anything that doesn’t make sense.
(e) When all references to an object are gone the memory used by the object is not reclaimed.

A) c

12) The concept of multiple inheritances is implemented in Java by

I. Extending two or more classes.
II. Extending one class and implementing one or more interfaces.
III. Implementing two or more interfaces.

(a) Only (II) (b) (I) and (II) (c) (II) and (III)
(d) Only (I) (e) Only (III).

A) c

13) In Java, declaring a class abstract is useful

(a) To prevent developers from further extending the class
(b) When it doesn’t make sense to have objects of that class
(c) When default implementations of some methods are not desirable
(d) To force developers to extend the class not to use its capabilities
(e) When it makes sense to have objects of that class.

A) b

14) What is the error in the following class definitions?

Abstract class xy
{
abstract sum (int x, int y) { }
}

(a) Class header is not defined properly.
(b) Constructor is not defined.
(c) Method is not defined properly
(d) Method is defined properly
(e) No error.

A) c

15) Which of these field declarations are legal within the body of an interface?

(a) Private final static int answer = 42 (b) public static int answer=42
(c) final static answer =42 (d) int answer
(e) No error.

A) b

16) A package is a collection of

(a) Classes (b) Interfaces (c) Editing tools
(d) Classes and interfaces (e) Editing tools and interfaces.

A) d

17) A method within a class is only accessible by classes that are defined within the same package as the class of the method. Which one of the following is used to enforce such restriction?

(a) Declare the method with the keyword public
(b) Declare the method with the keyword private
(c) Declare the method with the keyword protected
(d) Do not declare the method with any accessibility modifiers
(e) Declare the method with the keyword public and private.

A) d

18) Basic Java language functions are stored in which of the following java package?

(a) java.lang (b) java.io (c) java.net (d) java.util (e) java.awt

A) a

19) Which of the following is a member of the java.lang package?

(a) List (b) Queue (c) Math (d) Stack (e) Process.

A) b

20) Which of the following has a method names flush( )?

(a) Input stream (b) Output Stream
(c) Reader stream (d) Input reader stream
(e) Input output stream.

A) b

Core Java Multiple Choice Questions And Answers

Core Java Multiple Choice Questions # 21) What is the fundamental unit of information of writer streams?

(a) Characters (b) Bytes
(c) Files (d) Records (e) Information.

A) a

Core Java Multiple Choice Questions # 22) File class is included in which package?

(a) java.io package (b) java.lang package
(c) java.awt package (d) java.net.package
(e) java.util.package.

A) a

Core Java Multiple Choice Questions # 23) Given the code

String s1 = ” yes” ;
String s2 = ” yes ” ;
String s3 = new String ( s1);

Which of the following would equate to true?

(a) s1 == s2 (b) s1 = s2 (c) s3 == s1 (d) s3=s1 (e) s1!=s2.

A) a

Core Java Multiple Choice Questions # 24) URL stands for

(a) Universal reader locator (b) Universal reform loader
(c) Uniform resource loader (d) Uniform resource locator
(e) Uniform reader locator.

A) d

Core Java Multiple Choice Questions # 25) What is the sequence of major events in the life of an applet?

(a) init, start, stop, destroy (b) start, init , stop , destroy
(c) init, start , destroy, stop (d) init, start, destroy
(e) destroy, start, init, stop.

A) a

Core Java Multiple Choice Questions # 26) Which of the following is true in regard to applet execution?

(a) Applets loaded from the same computer where they are executing have the same restrictions as applets loaded from the network.
(b) Applets loaded and executing locally have none of the restrictions faced by applets that get loaded from the network.
(c) Applets loaded and executing locally have some restrictions faced by applets that get loaded from the network.
(d) Applets cant react to user input and change dynamically
(e) Applets can be run independently.

A) b

Core Java Multiple Choice Questions # 27) What is the return type of the method getID() defined in AWTEvent class

(a) Int (b) long (c) Object (d) Component (e) float.

A) a

Core Java Multiple Choice Questions # 28) Which of the following events will cause a thread to die?

(a) The method sleep( ) is called
(b) The method wait( ) is called
(c) Execution of the start( ) method ends
(d) Execution of the run( ) method ends
(e) Execution of the run() method is called.

A) d

Core Java Multiple Choice Questions # 29) What will be the result of the expression 13 & 25?

(a) 38 (b) 25 (c) 9 (d) 12 (e) 21.

A) c

Core Java Multiple Choice Questions # 30) Which of the following statements are true regarding the finalize( ) method?

(a) The finalize ( ) method must be declared with protected accessibility
(b) The compiler will fail to compile the code that explicitly tries to call the finalize( ) method
(c) The body of the finalize ( ) method can only access other objects that are eligible for garbage collection
(d) The finalize ( ) method can be overloaded
(e) The finalize() method cant be overloaded.

A) d

Core Java Objective Questions And Answers

Core Java Multiple Choice Questions # 31) Which one of these is a valid method declaration?

(a)
void method1
(b)
void method2()
(c)
void method3(void)
(d)
method4()
(e)
methods(void).

A) b

Core Java Multiple Choice Questions # 32) Given a class named Book, which one of these is a valid constructor declaration for the class?

(a)
Book(Book b) { }
(b)
Book Book() { }
(c)
private final Book() { }
(d)
void Book() { }
(e)
abstract Book() { }.

A) a

Core Java Multiple Choice Questions # 33) What will be the result of attempting to compile the following program?

public class MyClass {
long var;
public void MyClass(long param) { var = param; } //(1)
public static void main(String[] args) {
MyClass a,b;
a = new MyClass(); //(2)
b = new MyClass(5); //(3)
}
}

(a)
A compilation ERROR will occur at (1), since constructors cannot specify a return value
(b)
A compilation error will occur at (2), since the class does not have a default constructor
(c)
A compilation error will occur at (3), since the class does not have a constructor which takes one argument of type int
(d)
The program will compile correctly
(e)
The program will compile and execute correctly.

A) c

Core Java Multiple Choice Questions # 34) Given the following class, which of these is valid way of referring to the class from outside of the package net.basemaster?

package net.basemaster;
public class Base {
// . . .
}
Select the correct answer.

(a)
By simply referring to the class as Base
(b)
By simply referring to the class as basemaster.Base
(c)
By simply referring to the class as net.basemaster.Base
(d)
By simply referring to the class as net.Base
(e)
By importing with net.* and referring to the class as basemaster.Base.

A) c

Core Java Multiple Choice Questions # 35) Which one of the following class definitions is a valid definition of a class that cannot be instantiated?

(a)
class Ghost
{
abstract void haunt();
}

(b)
abstract class Ghost
{
void haunt();
}

(c)
abstract class Ghost
{
void haunt() { };
}

(d)
abstract Ghost
{
abstract void haunt();
}

(e)
static class Ghost
{
abstract haunt();
}

A) c

Core Java MCQ Questions With Answers

36) Which one of the following class definitions is a valid definition of a class that cannot be extended?

(a)
class Link { }
(b)
abstract class Link { }
(c)
native class Link { }
(d)
static class Link { }
(e)
final class Link { }.

A) e

37) Given the following definition of a class, which fields are accessible from outside the package com.corporation.project?

package com.corporation.project;
public class MyClass
{
int i;
public int j;
protected int k;
private int l;
}
Select the correct answer.

(a)
Field i is accessible in all classes in other packages
(b)
Field j is accessible in all classes in other packages
(c)
Field k is accessible in all classes in other packages
(d)
Field l is accessible in all classes in other packages
(e)
Field l is accessible in subclasses only in other packages.

A) b

38) How restrictive is the default accessibility compared to public, protected, and private accessibility?

(a)
Less restrictive than public
(b)
More restrictive than public, but less restrictive than protected
(c)
More restrictive than protected, but less restrictive than private
(d)
More restrictive than private
(e)
Less restrictive than protected from within a package, and more restrictive than protected from outside a package.

A) c

39) Which statement is true about accessibility of members?

(a)
Private members are always accessible from within the same package
(b)
Private members can only be accessed by code from within the class of the member
(c)
A member with default accessibility can be accessed by any subclass of the class in which it is defined
(d)
Private members cannot be accessed at all
(e)
Package/default accessibility for a member can be declared using the keyword default.

A) b

40) Which of the following is true about the use of modifiers?

(a)
If no accessibility modifier (public, protected, and private) is specified for a member declaration, the member is only accessible for classes in the package of its class and subclasses of its class anywhere
(b)
You cannot specify accessibility of local variables. They are only accessible within the block in which they are declared
(c)
Subclasses of a class must reside in the same package as the class they extend
(d)
Local variables can be declared static
(e)
None of the above.

A) b

Related Java Interview Questions

  1. 60 Java Multiple Choice Questions
  2. Aricent Java Interview Questions
  3. Accenture Java Interview Questions
  4. Advanced Java Interview Questions For 5 8 10 Years Experienced
  5. Core Java Interview Questions For Experienced

OTHER INTERVIEW QUESTIONS

  1. Anaplan Interview Questions And Answers
  2. Tableau Multiple Choice Questions
  3. Python Coding Interview Questions
  4. CSS3 Interview Questions
  5. Linux Administrator Interview Questions
  6. SQL Interview Questions
  7. Hibernate Interview Questions
  8. Kubernetes Interview Questions
  9. Kibana Interview Questions
  10. Nagios Interview Questions
  11. Jenkins Interview Questions
  12. Chef Interview Questions
  13. Puppet Interview Questions
  14. RPA Interview Questions And Answers
  15. Android Interview Questions
  16. Mulesoft Interview Questions
  17. JSON Interview Questions
  18. PeopleSoft HRMS Interview Questions
  19. PeopleSoft Functional Interview Questions
  20. PeopleTools Interview Questions
  21. Peoplesoft Technical Interview Questions
  22. 199 Peoplesoft Interview Questions
  23. 200 Blue Prism Interview Questions
  24. Visualforce Interview Questions
  25. Salesforce Interview Questions
  26. 300 SSIS Interview Questions
  27. PHP Interview Questions And Answers
  28. Alteryx Interview Questions
  29. AWS Cloud Support Interview Questions
  30. Google Kubernetes Engine Interview Questions
  31. AWS Devops Interview Questions

Anaplan Interview Questions And Answers 2018

Anaplan Interview Questions And Answers 2018. Here Coding compiler sharing a very useful list of 25 Anaplan questions. These real-time Anaplan interview questions will help you to crack your next Anaplan job interview. All the best for your future and happy Anaplan learning.

Anaplan Interview Questions

  1. What is Anaplan?
  2. What are your key responsibilities in your current job as an Anaplan consultant?
  3. What are the features of Anaplan?
  4. What are the Modeling features of Anaplan?
  5. How Anaplan handles User Access Control?
  6. What is COLLABORATIVE WORKFLOW in Anaplan?
  7. Explain HISTORY AND REVISION CONTROL in Anaplan?
  8. What is CENTRAL DATA REPOSITORY in Anaplan?
  9. What is DATA SYNCHRONICITY in Anaplan?
  10. Explain INTUITIVE MODELING INTERFACE in Anaplan?
  11. Is Anaplan accessible from Mobile?
  12. What is the use of DASHBOARDS AND REPORTS in Anaplan?
  13. Explain AVAILABILITY AND RELIABILITY in Anaplan?
  14. Explain APPLICATION SECURITY in Anaplan?
  15. What are the modules supported by Anaplan?

Anaplan Interview Questions And Answers

1) What are your key responsibilities in your current job as an Anaplan consultant?

A) It depends on the job roles and differs company to company, but generally, Anaplan consultants involved in identifying business requirements, requirements management, functional design, prototyping, process design (including scenario design, flow mapping), testing, training, defining support procedures and supporting implementations.

2) What is Anaplan?

A) Anaplan is a cloud-based planning and performance management platform with documented use cases in finance, sales, supply chain, marketing, IT and HR.

3) What are the features of Anaplan?

A) Anaplan Platform features:

CLOUD-BASED: Anaplan was built from day one as a cloud platform—combining cutting-edge security, in-memory data management, and massive scalability.

REAL-TIME, SCALABLE MODELING AND CALCULATION ENGINE: RealTimeModeling – By tracking dependencies at the level of the line item, our Hyperblock™ technology enables updates or changes to models of any size, from one to one trillion cells, in real time.

IN-MEMORY PROCESSING: Anaplan’s in-memory engine enables detailed planning models that utilizes all your data down to the transactional level (Product SKU, Stores, Employees, etc.) for better business decisions.

APP HUB: To get you started quickly, a growing collection of apps for common use cases are available in the Anaplan App Hub. Use them as is, modify them to suit your special needs, or start from scratch and create your own.

DATA INTEGRATION: Anaplan offers an API, import/export capabilities, and pre-built connectors for common platforms like Anaplan HyperConnect, Informatica, Dell Boomi, Mulesoft, and SnapLogic.

MULTI-DIMENSIONAL PLANNING: Build models to any level of granularity with any number of dimensions—layer in time (daily/weekly/monthly), hierarchies, relationships, and more.

VERSATILITY: Versatility is the ability to model a vast array of processes within your business. The 150+ apps in our App Hub can be applied to vastly different sets of processes, including sales performance optimization, financial budgeting and forecasting, and call center operations. All created by users with clicks, not code.

4) What are the Modeling features of Anaplan?

A) Modeling features of Anaplan:

MASTER REPOSITORY OF BUSINESS RULES (LIVING BLUEPRINT): Using our Living Blueprint technology, all your complex business rules (in natural syntax) are stored and managed in one easy-to-understand worksheet.

MODEL VERSIONS: Anaplan enables users to create new model versions on-the-fly. Quickly replicate models, load with data, and easily track actuals in the same model as plans.

BREAKBACK: With breakback, users can set a target for a formula, and the variables that make up that formula are changed according to the rules specified.

DYNAMIC SCENARIO BUILDING: Anaplan delivers strategic advantage with fast, easy creation of dynamic scenarios with time, version, and list dimensions.

5) How Anaplan handles User Access Control?

A) Anaplan enables flexible role-based security levels for user types. Audit trail, model restore, and selective user access make it possible for analysts to safely and simultaneously collaborate on common models.

Anaplan Interview Questions # 6) What is COLLABORATIVE WORKFLOW in Anaplan?

A) Monitor status and approvals with a collaborative workflow that streamlines top-down target allocation and consolidation of roll-ups from the field. A robust audit trail ensures that changes are easy to track.

Anaplan Interview Questions # 7) Explain HISTORY AND REVISION CONTROL in Anaplan?

A) Anaplan robust audit trail ensures that changes are easy to track and revert. See a history of users and changes and roll back to earlier versions.

Anaplan Interview Questions # 8) What is CENTRAL DATA REPOSITORY in Anaplan?

A) Anaplan delivers a central repository to reconcile various sources of data for clean, reliable hierarchy. Additionally, master data (products, employees, cost centers, etc.) is accessible to analysts around the enterprise.

Anaplan Interview Questions # 9) What is DATA SYNCHRONICITY in Anaplan?

A) Anaplan dynamically synchronizes data across connected plans—automatically aggregating and identifying discrepancies for real-time consistency.

Anaplan Interview Questions # 10) Explain INTUITIVE MODELING INTERFACE in Anaplan?

A) Business users can use familiar business syntax, drag-and-drop hierarchies, and built-in logic for time, versions, and scenarios. With Anaplan, there are no technical barriers between you and business insights. No reliance on IT for business rules adjustments, model creation, or changes. No more scripting or broken cell references.

Anaplan Analyst Interview Questions

Anaplan Interview Questions # 11) Is Anaplan accessible from Mobile?

A) Yes, Anaplan is accessible from any mobile device via a browser so you never have to be disconnected from your data.

Anaplan Interview Questions # 12) What is the use of DASHBOARDS AND REPORTS in Anaplan?

A) Anaplan has a variety of publishing features, including dashboards, charts, PDF generation, and a tightly integrated Excel® plug-in. Share insights with the field, enable management to do their own scenario analysis, and create stunning executive packs.

Anaplan Interview Questions # 13) Explain AVAILABILITY AND RELIABILITY in Anaplan?

A) Anaplan invested heavily to provide the highest levels of availability, reliability, and security. Redundant data centers and rigorous processes for back-up, failover, and disaster recovery comply with or exceed all major industry standards. Anaplan delivers constant uptime so that your business-critical data and plans are safe and accessible at all times.

Anaplan Interview Questions # 14) Explain APPLICATION SECURITY in Anaplan?

A) In addition to secure data centers, Anaplan provides complete application-layer security, including data encryption on-the-wire, secure authentication protocols, and robust access control and authorization for managing user rights. We also use leading security firms to conduct regular penetration testing.

15) What are the modules supported by Anaplan?

A) Anaplan supports following modules:

  • Finance
  • Sales
  • Supply chain
  • Workforce
  • Marketing
  • IT

Anaplan Interview Questions # 16) What are the features available in Finance module in Anaplan?

A) By connecting financial and operational planning, you can drive valuable business performance more effectively. With Anaplan’s cloud-based platform, corporate objectives align with operating plans that can be adjusted in response to market events—empowering finance to help the business make better decisions by anticipating the future.

  • Strategic Planning – Optimizing business models, product lines, and operational capabilities with ease and confidence.
  • Budgeting and forecasting – Increase speed and agility by automating the manual process and adopting best practices.
  • Operational planning – Take cross-functional decisions to unprecedented levels of operational planning in one platform.
  • Financial consolidation and corporate reporting – Experience a faster, more efficient period-end close and report with confidence—without compromising compliance.

Anaplan Interview Questions # 17) What are the features available in Sales module in Anaplan?

A) With Anaplan Sales module, deliver on-time sales plans while increasing compensation, quota, and forecast accuracy.

  • Sales Capacity
  • Account Segmentation and Scoring
  • Territory Planning
  • Quota Planning
  • Deal Desk
  • Sales Forecasting
  • Incentive Compensation

18) What are the features available in Anaplan for Supply chain?

A) Anaplan enables users to connect global supply chain network for maximum visibility, efficiency, and collaboration.

Product portfolio management
Demand planning
Supply planning
Sales and operations planning
Strategic policy management

19) What are the features available in Anaplan for workforce?

A) Align people plans to operational goals to support business results with the help of Anaplan for workforce.

  • Workforce
  • Headcount and Cost Planning
  • Workforce Capacity Planning
  • Succession Planning
  • Compensation and Equity Planning
  • Workforce Optimization, including Call Center
  • Onboarding Planning

20) What are the features available in Anaplan for Marketing?

A) ANAPLAN FOR Marketing helps in increase the efficiency and effectiveness of your marketing plan, performance, and spend.

  • Account Segmentation and Scoring
  • Marketing Resource Management
  • Marketing Performance Management
  • Trade Promotion Planning
  • Market Share and Growth Forecasting

Anaplan Interview Questions # 21) What are the features available in Anaplan for IT?

A) ANAPLAN FOR IT drive agile IT planning and project execution across your business.

  • Agile Implementation
  • ABC Shared Services Allocations
  • Agile Planning
  • Project Plan Capacity Analysis
  • Business Case Management
  • Project Planning
  • IT Financial Management and Cost Transparency
  • Business Management Scorecard
  • Facilities Management

Anaplan Interview Questions # 22) Do you know any Anaplan Customers?

A) Yes I know, many major companies using Anaplan, few of them are

VMWare
Tableau
Intel
HP
BOX
Motorola
Tata Steel

Anaplan Interview Questions # 23) What are Anaplan Apps?

A) Anaplan is the only technology in the world that enables business users to easily build sophisticated planning apps with zero coding.

Anaplan enables users to turn the complexity of business operations into powerful, easy-to-use applications for forecasting, planning, modeling, and performance management.

Anaplan Interview Questions # 24) What is Anaplan App Hub?

A) The Anaplan App Hub enables customers and partners to build, share, and deploy cutting-edge apps. The Anaplan community brings together experts from a wide range of business domains, industries, and organizations. You can quickly discover the applications you need, deploy them in one click, and customize them to solve your company’s complex challenges. You can also easily build your own applications on the platform and share them with others.

Anaplan Interview Questions # 25) What are the advantages of Anaplan?

A) The flexibility and scalability of the Anaplan platform means it can serve as a basis for financial, commercial as well as operational planning models. Furthermore, these models can easily be linked and work in seamless integration with one another.

Models can either be built from scratch, or extended and customized based on pre-delivered models – with models existing for topics such as

  • Traditional P&L,
  • Balance Sheet & Cash Flow planning,
  • Financial Consolidation,
  • Premium Modeling and Claims Analysis for insurance,
  • Sales Forecasting, Territory Planning,
  • Quota Management,
  • Pricing & Commission Calculation and many others.

These selection of models is constantly being extended. An Anaplan ‘model/app store’ will further accelerate availability. Source: Anaplan Website

OTHER INTERVIEW QUESTIONS

  1. Java Multiple Choice Questions
  2. Python Coding Interview Questions
  3. CSS3 Interview Questions
  4. Linux Administrator Interview Questions
  5. SQL Interview Questions
  6. Hibernate Interview Questions
  7. Kubernetes Interview Questions
  8. Kibana Interview Questions
  9. Nagios Interview Questions
  10. Jenkins Interview Questions
  11. Chef Interview Questions
  12. Puppet Interview Questions
  13. RPA Interview Questions And Answers
  14. Android Interview Questions
  15. Mulesoft Interview Questions
  16. JSON Interview Questions
  17. PeopleSoft HRMS Interview Questions
  18. PeopleSoft Functional Interview Questions
  19. PeopleTools Interview Questions
  20. Peoplesoft Technical Interview Questions
  21. 199 Peoplesoft Interview Questions
  22. 200 Blue Prism Interview Questions
  23. Visualforce Interview Questions
  24. Salesforce Interview Questions
  25. 300 SSIS Interview Questions
  26. PHP Interview Questions And Answers
  27. Alteryx Interview Questions
  28. AWS Cloud Support Interview Questions
  29. Google Kubernetes Engine Interview Questions
  30. AWS Devops Interview Questions

60 Java Multiple Choice Questions And Answers 2018

Java Multiple Choice Questions And Answers 2018. Here Coding compiler sharing a list of 60 core java and advanced java multiple choice questions and answers for freshers and experienced. These java multiple choice interview questions asked in various java interview exams. We hope that this list of java mcq questions will help you to crack your next java mcq online test. All the best for your future and happy java learning.

 Java Multiple Choice Questions

1) The default value of a static integer variable of a class in Java is,

(a) 0 (b) 1 (c) Garbage value (d) Null (e) -1.

A) a

2) What will be printed as the output of the following program?

public class testincr
{
public static void main(String args[])
{
int i = 0;
i = i++ + i;
System.out.println(“I = ” +i);
}
}

(a) I = 0 (b) I = 1 (c) I = 2 (d) I = 3 (e) Compile-time Error.

A) b

3) Multiple inheritance means,

(a) one class inheriting from more super classes
(b) more classes inheriting from one super class
(c) more classes inheriting from more super classes
(d) None of the above
(e) (a) and (b) above.

A) a

4) Which statement is not true in java language?

(a) A public member of a class can be accessed in all the packages.
(b) A private member of a class cannot be accessed by the methods of the same class.
(c) A private member of a class cannot be accessed from its derived class.
(d) A protected member of a class can be accessed from its derived class.
(e) None of the above.

A) b

5) To prevent any method from overriding, we declare the method as,

(a) static (b) const (c) final (d) abstract (e) none of the above.

A) c

6) Which one of the following is not true?

(a) A class containing abstract methods is called an abstract class.
(b) Abstract methods should be implemented in the derived class.
(c) An abstract class cannot have non-abstract methods.
(d) A class must be qualified as ‘abstract’ class, if it contains one abstract method.
(e) None of the above.

A) c

7) The fields in an interface are implicitly specified as,

(a) static only (b) protected (c) private
(d) both static and final (e) none of the above.

d

8) What is the output of the following program:

public class testmeth
{
static int i = 1;
public static void main(String args[])
{
System.out.println(i+” , “);
m(i);
System.out.println(i);
}
public void m(int i)
{
i += 2;
}
}

(a) 1 , 3 (b) 3 , 1 (c) 1 , 1 (d) 1 , 0 (e) none of the above.

A) c

9) Which of the following is not true?

(a) An interface can extend another interface.
(b) A class which is implementing an interface must implement all the methods of the interface.
(c) An interface can implement another interface.
(d) An interface is a solution for multiple inheritance in java.
(e) None of the above.

A) c

10) Which of the following is true?

(a) A finally block is executed before the catch block but after the try block.
(b) A finally block is executed, only after the catch block is executed.
(c) A finally block is executed whether an exception is thrown or not.
(d) A finally block is executed, only if an exception occurs.
(e) None of the above.

A) c

Java Multiple Choice Questions And Answers

11) Among these expressions, which is(are) of type String?

(a) “0” (b) “ab” + “cd”
(c) ‘0’
(d) Both (A) and (B) above (e) (A), (B) and (C) above.

A) d

12) Consider the following code fragment
Rectangle r1 = new Rectangle();
r1.setColor(Color.blue);
Rectangle r2 = r1;
r2.setColor(Color.red);

After the above piece of code is executed, what are the colors of r1 and
r2 (in this order)?

(a) Color.blue
Color.red
(b) Color.blue
Color.blue
(c) Color.red
Color.red
(d) Color.red
Color.blue
(e) None of the above.

A) c

13) What is the type and value of the following expression? (Notice the integer division)
-4 + 1/2 + 2*-3 + 5.0

(a) int -5 (b) double -4.5
(c) int -4
(d) double -5.0 (e) None of the above.

A) d

14) What is printed by the following statement?
System.out.print(“Hello,\nworld!”);

(a) Hello, \nworld! (b) Hello, world!
(c)
(d) “Hello, \nworld!” (e) None of the above.

A) c

15) Consider the two methods (within the same class)
public static int foo(int a, String s)
{
s = “Yellow”;
a=a+2;
return a;
}
public static void bar()
{
int a=3;
String s = “Blue”;
a = foo(a,s);
System.out.println(“a=”+a+” s=”+s);
}
public static void main(String args[])
{
bar();
}

What is printed on execution of these methods?

(a) a = 3 s = Blue (b) a = 5 s = Yellow (c) a = 3 s = Yellow
(d) a = 5 s = Blue (e) none of the above.

A) d

16) Which of the following variable declaration would NOT compile in a java program?

(a) int var; (b) int VAR; (c) int var1; (d) int var_1; (e) int 1_var;.

A) e

17) Consider the following class definition:

public class MyClass
{
private int value;
public void setValue(int i){ / code / }
// Other methods…
}

The method setValue assigns the value of i to the instance field value. What could you write for the implementation of setValue?

(a) value = i; (b) this.value = i; (c) value == i;
(d) Both (A) and (B) and above (e) (A), (B) and (C) above.

A) d

18) Which of the following is TRUE?

(a) In java, an instance field declared public generates a compilation error.
(b) int is the name of a class available in the package java.lang
(c) Instance variable names may only contain letters and digits.
(d) A class has always a constructor (possibly automatically supplied by the java compiler).
(e) The more comments in a program, the faster the program runs.

A) d

19) A constructor

(a) Must have the same name as the class it is declared within.
(b) Is used to create objects.
(c) May be declared private
(d) Both (A) and (B) above
(e) (a), (b) and (c) above.

A) e

20) Consider,

public class MyClass
{
public MyClass(){/code/}
// more code…
}

To instantiate MyClass, you would write?

(a) MyClass mc = new MyClass();
(b) MyClass mc = MyClass();
(c) MyClass mc = MyClass;
(d) MyClass mc = new MyClass;
(e) The constructor of MyClass should be defined as, public void MyClass(){/code/}.

A) a

Java Programming Multiple Choice Questions

Java Multiple Choice Questions 21) What is byte code in the context of Java?

(a) The type of code generated by a Java compiler.
(b) The type of code generated by a Java Virtual Machine.
(c) It is another name for a Java source file.
(d) It is the code written within the instance methods of a class.
(e) It is another name for comments written within a program.

A) a

Java Multiple Choice Questions 22) What is garbage collection in the context of Java?

(a) The operating system periodically deletes all the java files available on the system.
(b) Any package imported in a program and not used is automatically deleted.
(c) When all references to an object are gone, the memory used by the object is automatically reclaimed.
(d) The JVM checks the output of any Java program and deletes anything that doesn’t make sense.
(e) Janitors working for Sun Micro Systems are required to throw away any Microsoft documentation found in the employees’ offices.

A) c

Java Multiple Choice Questions 23) You read the following statement in a Java program that compiles and executes.
submarine.dive(depth);

What can you say for sure?

(a) depth must be an int
(b) dive must be a method.
(c) dive must be the name of an instance field.
(d) submarine must be the name of a class
(e) submarine must be a method.

A) b

Java Multiple Choice Questions 24) The java run time system automatically calls this method while garbage collection.

(a) finalizer() (b) finalize() (c) finally()
(d) finalized() (e) none of the above.

A) b

Java Multiple Choice Questions 25) The correct order of the declarations in a Java program is,

(a) Package declaration, import statement, class declaration
(b) Import statement, package declaration, class declaration
(c) Import statement, class declaration, package declaration
(d) Class declaration, import statement, package declaration
(e) Class declaration, package declaration, import statement.

A) a

Java Multiple Choice Questions 26) An overloaded method consists of,

(a) The same method name with different types of parameters
(b) The same method name with different number of parameters
(c) The same method name and same number and type of parameters with different return type
(d) Both (a) and (b) above
(e) (a), (b) and (c) above.

A) d

Java Multiple Choice Questions 27) A protected member can be accessed in,

(a) a subclass of the same package (b) a non-subclass of the same package
(c) a non-subclass of different package (d) a subclass of different package
(e) the same class.

Which is the false option?

A) c

Java Multiple Choice Questions 28) What is the output of the following code:

class eq
{
public static void main(String args[])
{
String s1 = “Hello”;
String s2 = new String(s1);
System.out.println(s1==s2);
}
}

(a) true (b) false (c) 0 (d) 1 (e) Hello.

A) b

Java Multiple Choice Questions 29) All exception types are subclasses of the built-in class

(a) Exception (b) RuntimeException (c) Error
(d) Throwable (e) None of the above.

A) d

Java Multiple Choice Questions 30) When an overridden method is called from within a subclass, it will always refer to the version of that method defined by the

(a) Super class
(b) Subclass
(c) Compiler will choose randomly
(d) Interpreter will choose randomly
(e) None of the abvove.

A) b

Java Multiple Choice Questions With Answers

Java Multiple Choice Questions 31) Mark the incorrect statement from the following:

(a) Java is a fully object oriented language with strong support for proper software engineering techniques
(b) In java it is not easy to write C-like so called procedural programs
(c) In java language objects have to be manipulated
(d) In java language error processing is built into the language
(e) Java is not a language for internet programming.

A) d

Java Multiple Choice Questions 32) In java, objects are passed as

(a) Copy of that object (b) Method called call by value
(c) Memory address (d) Constructor
(e) Default constructor.

A) c

Java Multiple Choice Questions 33) Which of the following is not a component of Java Integrated Development Environment (IDE)?

(a) Net Beans (b) Borland’s Jbuilder
(c) Symantec’s Visual Café (d) Microsoft Visual Fox Pro
(e) Microsoft Visual J++.

A) c

Java Multiple Choice Questions 34) Identify, from among the following, the incorrect variable name(s).

(a) _theButton (b) $reallyBigNumber
(c) 2ndName (d) CurrentWeatherStateofplanet
(e) my2ndFont.

A) c

Java Multiple Choice Questions 35) Use the following declaration and initialization to evaluate the Java expressions

int a = 2, b = 3, c = 4, d = 5;
float k = 4.3f;

System.out.println( – -b * a + c *d – -);

(a) 21 (b) 24 (c) 28 (d) 26 (e) 22.

A) b

Java Multiple Choice Questions 36) Use the following declaration and initialization to evaluate the Java expressions

int a = 2, b = 3, c = 4, d = 5;
float k = 4.3f;

System.out.println(a++);

(a) 3 (b) 2 (c) 4 (d) 10 (e) Synatax error.

A) b

Java Multiple Choice Questions 37) Use the following declaration and initialization to evaluate the Java expressions

int a = 2, b = 3, c = 4, d = 5;
float k = 4.3f;

System.out.println (-2U * ( g – k ) +c);

(a) 6 (b) 3 (c) 2 (d) 1 (e) Syntax error.

A) e

Java Multiple Choice Questions 38) Use the following declaration and initialization to evaluate the Java expressions

int a = 2, b = 3, c = 4, d = 5;
float k = 4.3f;

System.out.println (c=c++);

(a) 2 (b) 4 (c) 5 (d) 8 (e) Syntax error.

A) b

Java Multiple Choice Questions 39) Consider the following Java program :

class IfStatement{
public static void main(String args[])
{
int a=2, b=3;
if (a==3)
if (b==3)
System.out.println(“===============”);
else
System.out.println(“#################”);
System.out.println(“&&&&&&&&&&&”);
}
}

Which of the following will the output be?

(a) ===============
(b) #################
&&&&&&&&&
(c) &&&&&&&&&&&
(d) ===============
#################
&&&&&&&&&&
(e) ################.

A) c

Java Multiple Choice Questions 40) An applet cannot be viewed using

(a) Netscape navigator
(b) Microsoft Internet Explorer
(c) Sun’ Hot Java Browser
(d) Applet viewer tool which comes, with the Java Development Kit.
(e) Jbuilder.

A) d

Use the following Java program for answering question 11 and 12
class test{
void meth(int i, int j)
{
i *= 2;
i /= 2;
}
}

class argumentPassing
{
public static void main(String args[])
{
test ob = new test();
int a = 15, b = 20;

System.out.println(“a and b before call :”+ a +” ” + b);
ob.meth(a,b);
System.out.println(“a and b after call : “+ a + ” ” +b);
}

Core Java Multiple Choice Questions With Answers

41) What would the output be of the above Program – III before and after it is called?

(a) and b before call : 15 20 a and b after call : 30 10
(b) a and b before call : 5 2 a and b after call : 15 20
(c) a and b before call : 15 20 a and b after call : 15 20
(d) a and b before call : 30 10 a and b after call : 15 20
(e) a and b before call : 15 20 a and b after call :

A) c

42) What would the argument passing method be which is used by the above Program – III?

(a) Call by value (b) Call by reference
(c) Call by java.lang class (d) Call by byte code
(e) Call by compiler.

A) a

43) Consider the following program:

class prob1{
int puzzel(int n){

int result;

if (n==1)
return 1;
result = puzzel(n-1) * n;
return result;
}
}

class prob2{

public static void main(String args[])

{

prob1 f = new prob1();

System.out.println(” puzzel of 6 is = ” + f.puzzel(6));

}
}

Which of the following will be the output of the above program?

(a) 6 (b) 120 (c) 30 (d) 720 (e) 12.

A) d

44) The blank space in the following sentence has to be correctly filled :

Members of a class specified as ……………….. are accessible only to methods of that class.

(a) Protected (b) Final (c) Public (d) Private (e) Static.

A) d

45) Java compiler javac translates Java source code into ………………………

(a) Assembler language (b) Byte code
(c) Bit code (d) Machine code
(e) Platform dependent code.

A) b

46) ……………….. are used to document a program and improve its readability.

(a) System cells (b) Keywords (c) Comments (d) Control structures (e) Blocks.

A) c

47) In Java, a character constant’s value is its integer value in the ………………………character set.

(a) EBCDIC (b) Unicode (c) ASCII (d) Binary (e) BCD.

A) b

48) In Java, a try block should immediately be followed by one or more ……………….. blocks.

(a) Throw (b) Run (c) Exit (d) Catch (e) Error.

A) d

49) An abstract data type typically comprises a …………… and a set of ……………… respectively.

(a) Data representation, classes (b) Database, operations
(c) Data representation, objects (d) Control structure, operations
(e) Data representation, operations.

A) e

50) In object-oriented programming, the process by which one object acquires the properties of another object is called

(a) Encapsulation (b) Polymorphism (c) Overloading
(d) Inheritance (e) Overriding.

A) d

Advanced Java Multiple Choice Questions Ans Answers

51) Re-implementing an inherited method in a sub class to perform a different task from the parent class is called

(a) Binding (b) Transferring (c) Hiding (d) Coupling (e) extending.

A) e

52) In a class definition, the special method provided to be called to create an instance of that class is known as a/an

(a) Interpreter (b) Destructor (c) Constructor (d) Object (e) Compiler.

A) c

53) Consider the following statements about Java packages:

I. Packages don’t provide a mechanism to partition all class names into more manageable chunks.
II. Packages provide a visibility control mechanism.
III. One of the important properties of a package is that all classes defined inside a package is accessible by code outside that package.
IV. The .class files for classes declared to be part of a package can be stored in multiple directories.

Which of them is correct?
(a) Only (I) above (b) Only (II) above
(c) Only (III) above (d) Only (IV) above
(e) All (I), (II), (III) and (IV) above are wrong.

A) b

54) Consider the following statements:

I. A class can be declared as both abstract and final.
II. A class declared as final can be extended by defining a sub-class.
III. Resolving calls to methods dynamically at run-time is called late binding.
IV. The class Object defined by Java need not be a super class of all other classes.

Identify the correct statement from the following:

(a) Both (I) and (II) above (b) Both (III) and (IV) above
(c) Both (I) and (III) above (d) Both (II) and (IV) above
(e) Only (III) above.

A) e

55) Identify, from among the following, the incorrect descriptions related to Java :

(a) Java Virtual Machine translates byte code into its own system’s machine language and runs the resulting machine code
(b) The arithmetic operations *, /, %, + and – have the same level of precedence
(c) Comments do not cause any action to be performed during the program execution
(d) All variables must be given a type when they are declared
(e) Java variable names are case-sensitive.

A) b

56) Consider the following statement(s) about Java:

I. All white-space characters (blanks) are ignored by the compiler.
II. Java keywords can be used as variable names.
III. An identifier does not begin with a digit and does not contain any spaces.
IV. The execution of Java applications begins at method main.

Which of them is correct?

(a) Both (I) and (III) above (b) Both (II) and (IV) above
(c) Both (I) and (II) above (d) (III) and (IV) above
(e) All (I), (II), (III) and (IV) above.

A) d

57) Consider the following data types in Java :

I. Int II. Boolean III. Double IV. String V. Array.

Which of them are simple data types?

(a) Both (I) and (II) above (b) (I), (II), (III) and (IV) above
(c) (I), (II) and (III) above (d) (II) and (III) above
(e) All (I), (II), (III), (IV) and (V) above.

A) c

58) For what values respectively of the variables gender and age would the Java expression gender == 1 && age >= 65 become true?

(a) gender = 1, age = 60 (b) gender = 1, age = 50
(c) gender = 1, age = 65 (d) gender = 0, age = 70
(e) gender = 0, age = 55.

A) c

59) Consider the following Java program :

public class Compute {

public static void main (string args [ ])
{
int result, x ;
x = 1 ;
result = 0;
while (x < = 10) {
if (x%2 == 0) result + = x ;
+ + x ;
}
System.out.println(result) ;
}
}

Which of the following will be the output of the above program?

(a) 55 (b) 30 (c) 25 (d) 35 (e) 45.

A) b

60) Which of the following statements about Java Threads is correct?

(a) Java threads don’t allow parts of a program to be executed in parallel
(b) Java is a single-threaded language
(c) Java’s garbage collector runs as a high priority thread
(d) Ready, running and sleeping are three states that a thread can be in during its life cycle
(e) Every java application is not multithreaded.

A) d

Related Java Interview Questions

  1. Aricent Java Interview Questions
  2. Accenture Java Interview Questions
  3. Advanced Java Interview Questions For 5 8 10 Years Experienced
  4. Core Java Interview Questions For Experienced

OTHER INTERVIEW QUESTIONS

  1. Tableau Multiple Choice Questions
  2. Python Coding Interview Questions
  3. CSS3 Interview Questions
  4. Linux Administrator Interview Questions
  5. SQL Interview Questions
  6. Hibernate Interview Questions
  7. Kubernetes Interview Questions
  8. Kibana Interview Questions
  9. Nagios Interview Questions
  10. Jenkins Interview Questions
  11. Chef Interview Questions
  12. Puppet Interview Questions
  13. RPA Interview Questions And Answers
  14. Android Interview Questions
  15. Mulesoft Interview Questions
  16. JSON Interview Questions
  17. PeopleSoft HRMS Interview Questions
  18. PeopleSoft Functional Interview Questions
  19. PeopleTools Interview Questions
  20. Peoplesoft Technical Interview Questions
  21. 199 Peoplesoft Interview Questions
  22. 200 Blue Prism Interview Questions
  23. Visualforce Interview Questions
  24. Salesforce Interview Questions
  25. 300 SSIS Interview Questions
  26. PHP Interview Questions And Answers
  27. Alteryx Interview Questions
  28. AWS Cloud Support Interview Questions
  29. Google Kubernetes Engine Interview Questions
  30. AWS Devops Interview Questions

Tableau Multiple Choice Questions And Answers

Tableau Multiple Choice Questions And Answers For Experienced 2018. Here Coding compiler sharing a list of 34 Tableau MCQ Certification Questions that asked in Tableau certification exam. These questions also help you to crack your next Tableau job interview. All the best for your future and happy Tableau learning.

Tableau Multiple Choice Questions And Answers

1. A Reference Band cannot be based on two fixed points.
a) False
b) True

Answer Explanation: a

2. A Reference Distribution plot cannot be along a continuous axis.
a) True
b) False

Answer Explanation: b
A Reference Distribution plot can be along a continuous axis.

3. Which of the following is not a Trend Line model
a) Linear Trend Line
b) Exponential Trend Line
c) Binomial Trend Line
d) Logarithmic Trend Line

Answer Explanation: c
Binomial Trend Line is not a Trend Line model.

4. The image below uses which map visualization?
a) Filled maps
b) Layered maps
c) WMS server maps
d) Symbol maps

Answer Explanation: c

5. Is it possible to deploy a URL action on a dashboard object to open a Web Page within a dashboard rather than opening the system’s web browser?
a) True, with the use of Tableau Server
b) True, with the use of a Web Page object
c) False, not possible
d) True, requires a plug-in

Answer Explanation: b
True, with the use of a Web Page object it is possible to deploy a URL action on a dashboard object to open a web page within a dashboard rather than opening the system’s web browser.

6. The Highlighting action can be disabled for the entire workbook.
a) True
b) False

Answer Explanation: a
From the toolbar the Highlighting action can be disabled for the entire workbook.

7. A sheet cannot be used within a story directly. Either sheets should be used within a dashboard, or a dashboard should be used within a story.
a) True
b) False

Answer Explanation: b
A sheet can be used within a story directly.

8. How do you identify a continuous field in Tableau?
a) It is identified by a blue pill in the visualization.
b) It is identified by a green pill in a visualization.
c) It is preceded by a # symbol in the data window.
d) When added to the visualization, it produces distinct values.

Answer Explanation: b
It is identified by a green pill in a visualization

9. Is it possible to use measures in the same view multiple times (e.g. SUM of the measure and AVG of the measure)?
a) No
b) Yes

Answer Explanation: b
Yes, measures can be used multiple times in the same view.

10. Sets can be created on Measures.
a) False
b) True

Answer Explanation: a
Sets can be created on dimensions.

Tableau Multiple Choice Interview Questions And Answer

11. For creating variable size bins we use _____________.
a) Sets
b) Groups
c) Calculated fields
d) Table Calculations

Answer Explanation: c
For creating variable size bins we use Calculated Fields.

12. A good reason to use a bullet graph.
a) Analyzing the trend for a time period
b) Comparing the actual against the target sales
c) Adding data to bins and calculating count measure
d) Displaying the sales growth for a particular year

Answer Explanation: b

13. The line shown in the image below is a Reference Line. True or False?
a) true
b) false

Answer Explanation: b
The line shown in the image is a Trend Line.

14. Disaggregation returns all records in the underlying data source.
a) True
b) False

Answer Explanation: a
Disaggregation returns all records in the underlying data sources.

15. By definition, Tableau displays measures over time as a ____________.
a) Bar
b) Line
c) Histogram
d) Scatter Plots

Answer Explanation: b
By definition, Tableau displays measures over time as a Lines.

16. The icon associated with the field that has been grouped is a ______________.
a) Paper Clip
b) Set
c) Hash
d) Equal To

Answer Explanation: a
The icon associated with the field that has been grouped is a paper clip.

17. In the West region, which state’s sales fall within the Reference Band starting from average sales of that region till median of sales? (Perform the below questions in Tableau 9.0 and connect to the Saved Sample – Superstore dataset)
a) California
b) Colorado
c) Montana
d) New Mexico

Answer Explanation: b

18. Create a simple bar chart with Region and Total Expenses from the Sample- Superstore dataset and Sample -Coffee Chain dataset, respectively. (Establish the link on State). Identify the budgeted profit for the region having the 2nd highest total expenditure. (Connect to the Sample- Coffee Chain access file using the CoffeeChain Query table)
a) 84850
b) 87680
c) 80231
d) 84823

Answer Explanation: b

19. In 2012, what is the percent contribution of sales for Decaf in the East market? (Perform all the questions in Tableau 9.0 and connect to the Saved Sample-Superstore dataset)
a) 48.942%
b) 54.765%
c) 51.231%
d) 55.875%

Answer Explanation: a
48.942% is the percent contribution of sales of Decaf in 2012 in the East market.

20. In 2013, what is the percentage of total profit for Caffe Mocha falling under Major Market (Market Size)?(Perform all the questions in Tableau 9.0 and connect to the Saved Sample-Superstore dataset)
a) 60%
b) 45%
c) 58%
d) 55%

Answer Explanation: d
In 2013, the percentage of total profit for Caffe Mocha falling under Major Market is 55%.

Tableau Certification Questions And Answers

21. Create a heat map for Product Type, State, and Profit. Which state in the East market has the lowest profit for Espresso?(Use the Sample- Coffee Chain dataset for the following questions)
a) Florida
b) Connecticut
c) New York
d) New Hampshire

Answer Explanation: d
New Hampshire has the lowest profit for Espresso, in the East market.

22. In 2012, what is the difference in budget profit, in Q3 from the previous quarter for major market (Market Size)? (Use the Sample- Coffee Chain dataset for the following questions)
a) 630
b) -287
c) 667
d) 654

Answer Explanation: a

23. In which month did the running sales cross $30,000 for Decaf in Colorado and Florida? (Use the Sample- Coffee Chain dataset for the following questions)
a) November 2013
b) September 2013
c) May 2013
d) December 2013

Answer Explanation: c

24. Create a bar chart with Product Type, Product, and Profit. Identify which of the following products fall below the overall 99.9% Confidence Interval Distribution (Table across)? (Use the Sample- Coffee Chain dataset for the following questions)
a) Decaf Espresso
b) Green Tea
c) Caffe Latte
d) Regular Espresso

Answer Explanation: b

25. Using quartiles, identify which of the following Espresso product has the highest distribution of sales? (Use the Sample- Coffee Chain dataset for the following questions)
a) Decaf Espresso
b) Caffe Mocha
c) Caffe Latte
d) Regular Espresso

Answer Explanation: d
Regular Espresso has the highest distribution of sales in Espresso product.

26. In 2013, identify the state with the highest profit in the West market? (Use the Sample- Coffee Chain dataset for the following questions)
a) Utah
b) Nevada
c) California
d) Washington

Answer Explanation: c

27. Create a scatter plot with State, Sales, and Profit. Identify the Trend Line with ‘R-Squared’ value between 0.7 to 0.8? (Use the Sample- Coffee Chain dataset for the following questions)
a) Linear Trend Line
b) Logarithmic Trend Line
c) Exponential Trend Line
d) Polynomial Trend Line with Degree 2

Answer Explanation: d
The Trend Line with ‘R-Squared’ value between 0.7 to 0.8 is a Polynomial Trend Line with Degree 2.

28. Identify the total expenses to sales ratio of the state with the lowest profit. (Use the Sample- Coffee Chain dataset for the following questions)
a) 47.31%
b) 45.58%
c) 41.98%
d) 40.78%

Answer Explanation: b

29. Create a Combined Field with Product and State. Identify the highest selling product and its state. (Use the Sample- Coffee Chain dataset for the following questions)
a) Colombian, California
b) Colombian, Texa
c) Lemon, Neva
d) Darjeeling, Iowa

Answer Explanation: a

30. What is the contribution of tea to the overall Profit in 2012? (Use the Sample- Coffee Chain dataset for the following questions)
a) 24.323%
b) 22.664%
c) 20.416%
d) 21.765%

Answer Explanation: c

Tableau Multiple Choice Questions For Experienced

31. What is the average profit ratio for all the products starting with C? (Use the Sample- Coffee Chain dataset for the following questions)
a) 30%
b) 25%
c) 33%
d) 20%

Answer Explanation: c

32. What is the distinct count of area codes for the state with the lowest budget margin in small markets? (Use the Sample- Coffee Chain dataset for the following questions)
a) 3
b) 1
c) 2
d) 6

Answer Explanation: b

33. Which product type does not have any of its product within the Top 5 Products by sales? (Use the Sample- Coffee Chain dataset for the following questions)
a) Tea
b) Espresso
c) Coffee
d) Herbal Tea

Answer Explanation: a

34. In the Central region, the Top 5 Products by sales contributed _____ % of the total expenditure. (Use the Sample- Coffee Chain dataset for the following questions)
a) 48.54%
b) 51.66%
c) 69.21%
d) 54.02%

Answer Explanation: d
In the Central region, the Top 5 Products by sales contributed 54.02 % of the total expenditure.

OTHER INTERVIEW QUESTIONS

  1. Python Coding Interview Questions
  2. CSS3 Interview Questions
  3. Linux Administrator Interview Questions
  4. SQL Interview Questions
  5. Hibernate Interview Questions
  6. Kubernetes Interview Questions
  7. Kibana Interview Questions
  8. Nagios Interview Questions
  9. Jenkins Interview Questions
  10. Chef Interview Questions
  11. Puppet Interview Questions
  12. RPA Interview Questions And Answers
  13. Android Interview Questions
  14. Mulesoft Interview Questions
  15. JSON Interview Questions
  16. PeopleSoft HRMS Interview Questions
  17. PeopleSoft Functional Interview Questions
  18. PeopleTools Interview Questions
  19. Peoplesoft Technical Interview Questions
  20. 199 Peoplesoft Interview Questions
  21. 200 Blue Prism Interview Questions
  22. Visualforce Interview Questions
  23. Salesforce Interview Questions
  24. 300 SSIS Interview Questions
  25. PHP Interview Questions And Answers
  26. Alteryx Interview Questions
  27. AWS Cloud Support Interview Questions
  28. Google Kubernetes Engine Interview Questions
  29. AWS Devops Interview Questions
  30. Apigee Interview Questions

Python Coding Interview Questions And Answers

Python Coding Interview Questions And Answers 2018. Here Coding compiler sharing a list of 35 Python interview questions for experienced. These Python questions are prepared by the expert Python developers. This list of interview questions on Python will help you to crack your next Python job interview. All the best for your future and happy python learning.

Python Coding Interview Questions

  1. How do you debug a Python program?
  2. What is <Yield> Keyword in Python?
  3. How to convert a list into a string?
  4. How to convert a list into a tuple?
  5. How to convert a list into a set?
  6. How to count the occurrences of a particular element in the list?
  7. What is NumPy array?
  8. How can you create Empty NumPy Array In Python?
  9. What is a negative index in Python?
  10. How do you Concatenate Strings in Python?

Python Coding Interview Questions And Answers

Python Interview Questions # 1) How do you debug a Python program?

Answer) By using this command we can debug a python program

$ python -m pdb python-script.py

Python Interview Questions # 2) What is <Yield> Keyword in Python?

A) The <yield> keyword in Python can turn any function into a generator. Yields work like a standard return keyword.
But it’ll always return a generator object. Also, a function can have multiple calls to the <yield> keyword.

Example:

def testgen(index):
weekdays = [‘sun’,’mon’,’tue’,’wed’,’thu’,’fri’,’sat’]
yield weekdays[index]
yield weekdays[index+1]

day = testgen(0)
print next(day), next(day)

Output: sun mon

Python Interview Questions # 3) How to convert a list into a string?

A) When we want to convert a list into a string, we can use the <”.join()> method which joins all the elements into one and returns as a string.

Example:

weekdays = [‘sun’,’mon’,’tue’,’wed’,’thu’,’fri’,’sat’]
listAsString = ‘ ‘.join(weekdays)
print(listAsString)

Python Interview Questions # 4) How to convert a list into a tuple?

A) By using Python <tuple()> function we can convert a list into a tuple. But we can’t change the list after turning it into tuple, because it becomers immutable.

Example:

weekdays = [‘sun’,’mon’,’tue’,’wed’,’thu’,’fri’,’sat’]
listAsTuple = tuple(weekdays)
print(listAsTuple)

output: (‘sun’, ‘mon’, ‘tue’, ‘wed’, ‘thu’, ‘fri’, ‘sat’)

Python Interview Questions # 5) How to convert a list into a set?

A) User can convert list into set by using <set()> function.

Example:

weekdays = [‘sun’,’mon’,’tue’,’wed’,’thu’,’fri’,’sat’,’sun’,’tue’]
listAsSet = set(weekdays)
print(listAsSet)

output: set([‘wed’, ‘sun’, ‘thu’, ‘tue’, ‘mon’, ‘fri’, ‘sat’])

Python Interview Questions # 6) How to count the occurrences of a perticular element in the list?

A) In Python list, we can count the occurences of a individual element by using a <count()> function.

Example # 1:

weekdays = [‘sun’,’mon’,’tue’,’wed’,’thu’,’fri’,’sun’,’mon’,’mon’]
print(weekdays.count(‘mon’))

Output: 3

Example # 2:

weekdays = [‘sun’,’mon’,’tue’,’wed’,’thu’,’fri’,’sun’,’mon’,’mon’]
print([[x,weekdays.count(x)] for x in set(weekdays)])

output: [[‘wed’, 1], [‘sun’, 2], [‘thu’, 1], [‘tue’, 1], [‘mon’, 3], [‘fri’, 1]]

Python Interview Questions # 7) What is NumPy array?

A) NumPy arrays are more flexible then lists in Python. By using NumPy arrays reading and writing items is faster and more efficient.

Python Interview Questions # 8) How can you create Empty NumPy Array In Python?

A) We can create Empty NumPy Array in two ways in Python,

1) import numpy
numpy.array([])

2) numpy.empty(shape=(0,0))

Python Interview Questions # 9) What is a negative index in Python?

A) Python has a special feature like a negative index in Arrays and Lists. Positive index reads the elements from the starting of an array or list but in the negative index, Python reads elements from the end of an array or list.

Python Interview Questions # 10) What is the output of the below code?

>> import array
>>> a = [1, 2, 3]
>>> print a[-3]
>>> print a[-2]
>>> print a[-1]

A) The output is: 3, 2, 1

Advanced Python Coding Interview Questions

Python Coding Interview Questions # 11) What is the output of the below program?

>>>names = [‘Chris’, ‘Jack’, ‘John’, ‘Daman’]
>>>print(names[-1][-1])

A) The output is: n

Python Coding Interview Questions # 12) What is Enumerate() Function in Python?

A) The Python enumerate() function adds a counter to an iterable object. enumerate() function can accept sequential indexes starting from zero.

Python Enumerate Example:

subjects = (‘Python’, ‘Interview’, ‘Questions’)

for i, subject in enumerate(subjects):
print(i, subject)

Output:

0 Python
1 Interview
2 Questions

Python Coding Interview Questions # 13) What is data type SET in Python and how to work with it?

A) The Python data type “set” is a kind of collection. It has been part of Python since version 2.4. A set contains an unordered collection of unique and immutable objects.

# *** Create a set with strings and perform search in set

objects = {“python”, “coding”, “tips”, “for”, “beginners”}

# Print set.
print(objects)
print(len(objects))

# Use of “in” keyword.
if “tips” in objects:
print(“These are the best Python coding tips.”)

# Use of “not in” keyword.
if “Java tips” not in objects:
print(“These are the best Python coding tips not Java tips.”)

# ** Output

{‘python’, ‘coding’, ‘tips’, ‘for’, ‘beginners’}
5
These are the best Python coding tips.
These are the best Python coding tips not Java tips.

# *** Lets initialize an empty set
items = set()

# Add three strings.
items.add(“Python”)
items.add(“coding”)
items.add(“tips”)

print(items)

# ** Output

{‘Python’, ‘coding’, ‘tips’}

Python Coding Interview Questions # 14) How do you Concatenate Strings in Python?

A) We can use ‘+’ to concatenate strings.

Python Concatenating Example:

# See how to use ‘+’ to concatenate strings.

>>> print(‘Python’ + ‘ Interview’ + ‘ Questions’)

# Output:

Python Interview Questions

Python Coding Interview Questions # 15) How to generate random numbers in Python?

A) We can generate random numbers using different functions in Python. They are:

#1. random() – This command returns a floating point number, between 0 and 1.

#2. uniform(X, Y) – It returns a floating point number between the values given as X and Y.

#3. randint(X, Y) – This command returns a random integer between the values given as X and Y.

Python Coding Interview Questions # 16) How to print sum of the numbers starting from 1 to 100?

A) We can print sum of the numbers starting from 1 to 100 using this code:

print sum(range(1,101))

# In Python the range function does not include the end given. Here it will exclude 101.
# Sum funtion print sum of the elements of range funtion, i.e 1 to 100.

Python Coding Interview Questions # 17) How do you set a global variable inside a function?

A) Yes, we can use a global variable in other functions by declaring it as global in each function that assigns to it:

globvar = 0
def set_globvar_to_one():
global globvar # Needed to modify global copy of globvar
globvar = 1
def print_globvar():
print globvar # No need for global declaration to read value of globvar
set_globvar_to_one()
print_globvar() # Prints 1

Python Coding Interview Questions # 18) What is the output of the program?

names1 = [‘Amir’, ‘Bear’, ‘Charlton’, ‘Daman’]
names2 = names1
names3 = names1[:]

names2[0] = ‘Alice’
names3[1] = ‘Bob’

sum = 0
for ls in (names1, names2, names3):
if ls[0] == ‘Alice’:
sum += 1
if ls[1] == ‘Bob’:
sum += 10

print sum

A) 12

Python Coding Interview Questions # 19) What is the output, Suppose list1 is [1, 3, 2], What is list1 * 2 ?

A) [1, 3, 2, 1, 3, 2]

Python Coding Interview Questions # 20) What is the output when we execute list(“hello”)?

A) [‘h’, ‘e’, ‘l’, ‘l’, ‘o’]

Python Coding Interview Questions And Answers For Experienced

21) Can you write a program to find the average of numbers in a list in Python?

A) Python Program to Calculate Average of Numbers:

n=int(input(“Enter the number of elements to be inserted: “))
a=[]
for i in range(0,n):
elem=int(input(“Enter element: “))
a.append(elem)
avg=sum(a)/n
print(“Average of elements in the list”,round(avg,2))

Output:

Enter the number of elements to be inserted: 3
Enter element: 23
Enter element: 45
Enter element: 56
Average of elements in the list 41.33

22) Write a program to reverse a number in Python?

A) Python Program to Reverse a Number:

n=int(input(“Enter number: “))
rev=0
while(n>0):
dig=n%10
rev=rev*10+dig
n=n//10
print(“Reverse of the number:”,rev)

Output:

Enter number: 143
Reverse of the number: 341

23) Write a program to find sum of the digits of a number in Python?

A) Python Program to Find Sum of the Digits of a Number

n=int(input(“Enter a number:”))
tot=0
while(n>0):
dig=n%10
tot=tot+dig
n=n//10
print(“The total sum of digits is:”,tot)

Output:

Enter a number:1928
The total sum of digits is: 20

24) Write a Python Program to Check if a Number is a Palindrome or not?

A) Python Program to Check if a Number is a Palindrome or Not:

n=int(input(“Enter number:”))
temp=n
rev=0
while(n>0):
dig=n%10
rev=rev*10+dig
n=n//10
if(temp==rev):
print(“The number is a palindrome!”)
else:
print(“The number isn’t a palindrome!”)

Output:

Enter number:151
The number is a palindrome!

25) Write a Python Program to Count the Number of Digits in a Number?

A) Python Program to Count the Number of Digits in a Number:

n=int(input(“Enter number:”))
count=0
while(n>0):
count=count+1
n=n//10
print(“The number of digits in the number are:”,count)

Output:

Enter number:14325
The number of digits in the number are: 5

26) Write a Python Program to Print Table of a Given Number?

A) Python Program to Print Table of a Given Number:

n=int(input(“Enter the number to print the tables for:”))
for i in range(1,11):
print(n,”x”,i,”=”,n*i)

Output:

Enter the number to print the tables for:7
7 x 1 = 7
7 x 2 = 14
7 x 3 = 21
7 x 4 = 28
7 x 5 = 35
7 x 6 = 42
7 x 7 = 49
7 x 8 = 56
7 x 9 = 63
7 x 10 = 70

27) Write a Python Program to Check if a Number is a Prime Number?

A) Python Program to Check if a Number is a Prime Number:

a=int(input(“Enter number: “))
k=0
for i in range(2,a//2+1):
if(a%i==0):
k=k+1
if(k<=0):
print(“Number is prime”)
else:
print(“Number isn’t prime”)

Output:

Enter number: 7
Number is prime

28) Write a Python Program to Check if a Number is an Armstrong Number?

A) Python Program to Check if a Number is an Armstrong Number:

n=int(input(“Enter any number: “))
a=list(map(int,str(n)))
b=list(map(lambda x:x**3,a))
if(sum(b)==n):
print(“The number is an armstrong number. “)
else:
print(“The number isn’t an arsmtrong number. “)

Output:

Enter any number: 371
The number is an armstrong number.

29) Write a Python Program to Check if a Number is a Perfect Number?

A) Python Program to Check if a Number is a Perfect Number:

n = int(input(“Enter any number: “))
sum1 = 0
for i in range(1, n):
if(n % i == 0):
sum1 = sum1 + i
if (sum1 == n):
print(“The number is a Perfect number!”)
else:
print(“The number is not a Perfect number!”)

Output:

Enter any number: 6
The number is a Perfect number!

Python Developer Interview Questions And Answers

30) Write a Python Program to Check if a Number is a Strong Number?

A) Python Program to Check if a Number is a Strong Number:

sum1=0
num=int(input(“Enter a number:”))
temp=num
while(num):
i=1
f=1
r=num%10
while(i<=r):
f=f*i
i=i+1
sum1=sum1+f
num=num//10
if(sum1==temp):
print(“The number is a strong number”)
else:
print(“The number is not a strong number”)

Output:

Enter a number:145
The number is a strong number.

31) Write a Python Program to Find the Second Largest Number in a List?

A) Python Program to Find the Second Largest Number in a List:

a=[]
n=int(input(“Enter number of elements:”))
for i in range(1,n+1):
b=int(input(“Enter element:”))
a.append(b)
a.sort()
print(“Second largest element is:”,a[n-2])

Output:

Enter number of elements:4
Enter element:23
Enter element:56
Enter element:39
Enter element:11
Second largest element is: 39

32) Write a Python Program to Swap the First and Last Value of a List?

A) Python Program to Swap the First and Last Value of a List:

a=[]
n= int(input(“Enter the number of elements in list:”))
for x in range(0,n):
element=int(input(“Enter element” + str(x+1) + “:”))
a.append(element)
temp=a[0]
a[0]=a[n-1]
a[n-1]=temp
print(“New list is:”)
print(a)

Output:

Enter the number of elements in list:4
Enter element1:23
Enter element2:45
Enter element3:67
Enter element4:89
New list is:
[89, 45, 67, 23]

33) Write a Python Program to Check if a String is a Palindrome or Not?

A) Python Program to Check if a String is a Palindrome or Not:

string=raw_input(“Enter string:”)
if(string==string[::-1]):
print(“The string is a palindrome”)
else:
print(“The string isn’t a palindrome”)

Output:

Enter string:malayalam
The string is a palindrome

34) Write a Python Program to Count the Number of Vowels in a String?

A) Python Program to Count the Number of Vowels in a String:

string=raw_input(“Enter string:”)
vowels=0
for i in string:
if(i==’a’ or i==’e’ or i==’i’ or i==’o’ or i==’u’ or i==’A’ or i==’E’ or i==’I’ or i==’O’ or i==’U’):
vowels=vowels+1
print(“Number of vowels are:”)
print(vowels)

Output:

Enter string:Hello world
Number of vowels are:
3

35) Write a Python Program to Check Common Letters in Two Input Strings?

A) Python Program to Check Common Letters in Two Input Strings:

s1=raw_input(“Enter first string:”)
s2=raw_input(“Enter second string:”)
a=list(set(s1)&set(s2))
print(“The common letters are:”)
for i in a:
print(i)

Output:

Enter first string:Hello
Enter second string:How are you
The common letters are:
H
e
o

Related Python Tutorials

Other Interview quesTIONS

  1. CSS3 Interview Questions
  2. Linux Administrator Interview Questions
  3. SQL Interview Questions
  4. Hibernate Interview Questions
  5. Kubernetes Interview Questions
  6. Kibana Interview Questions
  7. Nagios Interview Questions
  8. Jenkins Interview Questions
  9. Chef Interview Questions
  10. Puppet Interview Questions
  11. RPA Interview Questions And Answers
  12. Android Interview Questions
  13. Mulesoft Interview Questions
  14. JSON Interview Questions
  15. PeopleSoft HRMS Interview Questions
  16. PeopleSoft Functional Interview Questions
  17. PeopleTools Interview Questions
  18. Peoplesoft Technical Interview Questions
  19. 199 Peoplesoft Interview Questions
  20. 200 Blue Prism Interview Questions
  21. Visualforce Interview Questions
  22. Salesforce Interview Questions
  23. 300 SSIS Interview Questions
  24. PHP Interview Questions And Answers
  25. Alteryx Interview Questions
  26. AWS Cloud Support Interview Questions
  27. Google Kubernetes Engine Interview Questions
  28. AWS Devops Interview Questions
  29. Apigee Interview Questions
  30. Actimize Interview Questions

CSS3 Interview Questions And Answers For Experienced

CSS3 Interview Questions And Answers For Experienced. Here Coding compiler sharing a very good list of 75 CSS3 interview questions asked in various UI development interviews by MNC companies. We are sure that these CSS interview questions will help you to crack your next CSS job interview. All the best for your future and happy CSS learning.

CSS3 Interview Questions

  1. What is the difference between CSS2 and CSS3?
  2. What are the new features of CSS3?
  3. What are the CSS3 modules?
  4. What are CSS3 media queries?
  5. What are CSS3 media types?
  6. What are CSS3 Selectors?
  7. How can you create Rounded corners in CSS3?
  8. What are the associated border-radius properties?
  9. How can you create a CSS3 property for each corner?
  10. Is it possible to create border as an Image in CSS3?

CSS3 Interview Questions And Answers

Let’s start learning about various CSS3 interview questions and answers for experienced.

Difference Between CSS2 and CSS3

  •  Modules
  •  Media Queries
  •  Namespaces
  •  Selectors
  •  Color

1) CSS3 Modules

1) The main difference between CSS2 and CSS3 is that CSS3 divided into two different sections Called Modules.
2) In CSS2 everything is submitted as a single document with all the Cascading Style Sheets information within it.
3) These Modules are much easier for different browsers to accept various aspects of CSS3 and implement.
4) There is a wider range of browser support for CSS3 Modules over CSS and CSS2.

CSS3 Modules List

  • Selectors
  • Box Model
  • Backgrounds
  • Image Values and Replaced Content
  • Text Effects
  • 2D Transformations
  • 3D Transformations
  • Animations
  • Multiple Column Layout
  • User Interface

2) CSS3 Media Queries

1) In CSS2, we have Media Types, users can define different style rules for different media types like computer screens, printers, and handled devices.

2) But in CSS3, instead of using Media Types, extended the CSS2 Media Types idea with Media Queries.

3) Unlike looking for a type of device in CSS2 media type, CSS3 Media Queries look at the capability of the device.

4) CSS3 media queries look for width and height of the viewport, width, and height of the device, orientation, and resolution of the screen.

CSS3 Media Types

all – Used for all media type devices
print – Used for printers
screen – Used for computer screens, tablets, smart-phones etc.
speech – Used for screenreaders that “reads” the page out loud

CSS3 Media Query Example

If the viewport is minimum 480 pixels or widee then the body backgroud color will be changed to blue.

@media screen and (min-width: 480px) {
body {
background-color: blue;
}
}

3) CSS3 Namespaces

This CSS Namespaces module defines syntax for using namespaces in CSS. It defines the @namespace rule for declaring a default namespace and for binding namespaces to namespace prefixes.

@namespace “http://www.w3.org/1999/xhtml”;
@namespace svg “http://www.w3.org/2000/svg”;

The first rule declares a default namespace http://www.w3.org/1999/xhtml to be applied to names that have no explicit namespace component.

The second rule declares a namespace prefix svg that is used to apply the namespace http://www.w3.org/2000/svg where the svg namespace prefix is used.

4) CSS3 Selectors

In CSS3, there are few new Selectors and pseudo-elements are introduced, let’s discuss them.

1) attribute beginning matches exactly

element[foo^=”bar”]

The element has an attribute called foo that begins with “bar” e.g.

2) attribute ending matches exactly

element[foo$=”bar”]

The element has an attribute called foo that ends with “bar” e.g.

3) attribute contains the match

element[foo*=”bar”]

The element has an attribute called foo that contains the string “bar” e.g.

CSS3 new pseudo-classes:

:root

The root element of the document. In HTML this is always

:nth-child(n)

use this to match exact child elements or use variables to get alternating matches

:nth-last-child(n)

match exact child elements counting up from the last one

:nth-of-type(n)

match sibling elements with the same name before it in the document tree

:nth-last-of-type(n)

match sibling elements with the same name counting up from the bottom

:last-childmatch

the last child element of the parent

:first-of-typematch

the first sibling element of that type

:last-of-typematch

the last sibling element of that type

:only-childmatch

the element that is the only child of its parent

:only-of-typematch

the element that is the only one of its type

:emptymatch

the element that has no children (including text nodes)

:targetmatch

an element that is the target of the referring URI

:enabledmatch

the element when it’s enabled

:disabledmatch

the element when it’s disabled

:checkedmatch

the element when it’s checked (radio button or checkbox)

:not(s)

match when the element does not match the simple selectors

New CSS3 Style Properties

Many graphics related properties are introduced in CSS3.

1) Border-radius or box-shadow, flexbox or even CSS Grid are newer styles introduced in CSS3.

2) In CSS3 the box model not changed but using new style properties users can change background, border and styles of a box.

3) In CSS3 using properties like background-image, background-position, and background-repeat styles users can specify multiple background images to be placed on top of one another.

4) CSS3 background-clip property defines how the background image should be clipped.

5) CSS3 background-origin property determines whether the background should be placed in the padding box, the border box, or the content box.

6) CSS3 background-size property allows you to indicate the size of the background image. This property allows users to stretch smaller images to fit the page.

7) CSS borders can be the styles of solid, double, dashed, and image. In addition to existing boarder properties CSS3 brings in the ability to create rounded corners.

8) There are some new border-radius properties are introduced in CSS3.

9) border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-top-left-radiusThese properties allow you to create rounded corners on your borders.

10) border-image-source – Specifies the image source file to be used instead of border styles already defined.

11) border-image-slice – Represents the inward offsets from the border image edges

12) border-image-width – Defines the value of the width for your border image

13) border-image-outset – Specifies the amount that the border image area extends beyond the border box

14) border-image-stretch – Defines how the sides and middle parts of the border image should be tiled or scaled

15) border-image – The shorthand property for all the border image properties

16) column-width – Defines the width of your columns should be.

17) column-count – Defines the number of columns on the page.

18) columnsShorthand property where you can define either the width or number.

19) column-gap Defines the width of the gaps between the columns.

20) column-rule-color Defines the color of the rule.

21) column-rule-style Defines the style of the rule (solid, dotted, double, etc.)

22) column-rule-width Defines the width of the rule

23) column-rule A shorthand property defining all three column rule properties at once.

24) CSS Template layout module and CSS3 Grid positioning module- creating grids with CSS

25) CSS3 Text module – outline text and even create drop-shadows with CSS

26) CSS3 Color module – with opacity

27) Changes to the box model – including a marquee property that acts like the IE tag

28) CSS3 User Interface module – giving you new cursors, responses to actions, required fields, and even resizing elements

29) CSS3 Ruby module – provides support for languages that use textual ruby to annotate documents

30) CSS3 Paged Media module – for even more support for paged media (paper, transparencies, etc)

31) Generated content – running headers and footers, footnotes, and other content that is generated programmatically, especially for paged media

32) CSS3 Speech module – changes to aural CSS

33) CSS3 supports additional color properties like RGBA colors, HSL colors, HSLA colors, Opacity.

CSS3 Interview Questions And Answers For Experienced

1) How can you create Rounded corners in CSS3?

A) By using CSS3 border-radius property, we can create rounded corners to body or text.

Sample CSS3 Code to create Rounded corners:

Boarder-Radius Syntax:

#roundcorners {
border-radius: 60px/15px;
background: #FF0001;
padding: 10px;
width: 200px;
height: 150px;
}

2) What are the associated border-radius properties?

A) There are four border-radius properties are there, they are:

  • border-radius Use this element for setting four boarder radius property
  • border-top-left-radius Use this element for setting the boarder of top left corner
  • border-top-right-radius Use this element for setting the boarder of top right corner
  • border-bottom-right-radius Use this element for setting the boarder of bottom right corner
  • border-bottom-left-radius Use this element for setting the boarder of bottom left corner

3) How can you create CSS3 property for each corner?

A) We can create property for each corner by defining style for each corner, see below example:

<style>
#roundcorners1 {
border-radius: 15px 50px 30px 5px;
background: #a44170;
padding: 20px;
width: 100px;
height: 100px;
}
#roundcorners2 {
border-radius: 15px 50px 30px;
background: #a44170;
padding: 20px;
width: 100px;
height: 100px;
}
#roundcorners3 {
border-radius: 15px 50px;
background: #a44170;
padding: 20px;
width: 100px;
height: 100px;
}
</style>

4) Is it possible to create border as a Image in CSS3?

A) Yes it is possible, by using CSS3 border image property we can use image as a border.

5) What are the associate boarder image properties in CSS3?

A) There are four major boarder image properties are there, they are:

  • border-image-source Used to set the image path
  • border-image-slice Used to slice the boarder image
  • border-image-width Used to set the boarder image width
  • border-image-repeat Used to set the boarder image as rounded, repeated and stretched

6) Can you write CSS3 code for creating boarder image?

A) Here is the CSS3 code for creting boarder as image:

#borderimg {
border: 10px solid transparent;
padding: 15px;
border-image-source: url(/css/images/border-bg.png);
border-image-repeat: round;
border-image-slice: 30;
border-image-width: 10px;
}

7) What is Multi Background property in CSS3?

A) Multi background property is used to add one or more images to the background in CSS3.

8) What are the most commonly used Multi Backgroud properties in CSS3?

A) There are four most commonly used multi background properties, they are:

  • background-clip Used to declare the painting area of the background
  • background-image Used to specify the background image
  • background-origin Used to specify position of the background images
  • background-size Used to specify size of the background images

9) Can you write CSS3 code for creating Multi Background Images?

A) Here is the CSS3 code for creating multi background images.

<style>
#multibackgroundimg {
background-image: url(/css/images/logo1.png), url(/css/images/border1.png);
background-position: left top, left top;
background-repeat: no-repeat, repeat;
padding: 75px;
}
</style>

10) What are the new color properties introduced in CSS3?

A) In CSS3, there are few Color properties are introduced they are:

  • RGBA colors
  • HSL colors
  • HSLA colors
  • Opacity

Advanced CSS3 Interview Questions And Answers

11) What RGBA stands for in CSS3?

A) RGBA stands for Red Green Blue Alpha.

12) What HSL stands for in CSS3?

A) HSL stands for hue, saturation, lightness.

13) What HSLA stands for in CSS3?

A) HSLA stands for hue, saturation, lightness and alpha.

14) What is gradient in CSS3?

A) Gradients displays the combination of two or more colors in one grid.

15) What are the types of Gradients in CSS3?

A) In CSS3 there are mainly two types of gradients are there, they are:

Linear Gradients(down/up/left/right/diagonally)

Radial Gradients

16) How can you add gradients to your project?

A) All gradients are read from a gradients.json file which is available in this project’s repo. Simply add your gradient details to it and submit a pull request.
http://uigradients.com/#

17) How can you create shadow effets in CSS3?

A) We can create shadow effects for text using text-shadow and for boxes using box-shadow properties.

18) Can you write CSS3 code to create shadow effect?

A) Here is the sample code for shadow effects:

Text shadow for text element:

H1 {
text-shadow: 2px 2px;
}

Box shadow for box element:

<style>
div {
width: 300px;
height: 100px;
padding: 15px;
background-color: red;
box-shadow: 10px 10px;
}
</style>

19) What are the newly introduced Text related features in CSS3?

A) There are mainly three Text related features are introduced, they are:

text-overflow
text-emphasis
text-align-last
word-wrap
word-break

20) What is text-overflow property used in CSS3?

A) The text-overflow property determines how overflowed content that is not displayed is signaled to users.

Example 1:

p.text1 {
white-space: nowrap;
width: 400px;
border: 2px solid #000000;
overflow: hidden;
text-overflow: clip; //It wont show overflow text.
}

Example 2:

p.text2 {
white-space: nowrap;
width: 300px;
border: 2px solid #000000;
overflow: hidden;
text-overflow: ellipsis; //It indicates overflow text with dots …
}

Real-Time CSS3 Interview Questions And Answers

21) What is word-break property used in CSS3?

A) In CSS3 word-break is used to break the line.

Example 1:

<style>
p.text1 {
width: 150px;
border: 2px solid #000000;
word-break: keep-all; //It breaks the word with hyphens at line break
}

Example 2:

p.text2 {
width: 150px;
border: 2px solid #000000;
word-break: break-all; // It breaks the work without hyphens in line break
}
</style>

22) What is CSS3 word-wrap property?

A) In CSS3 word-wrap is used to break the line and wrap onto next line.

23) What are the different web fonts formats in CSS3?

A) Web fonts allows users to use the fonts in CSS3, which are not installed on local system.

There are five types of web fonts formats are there, they are:

1) TTF – TrueType Fonts
2) OTF – OpenType Fonts
3) WOFF – The Web Open Font Format
4) SVG Fonts
5) EOT – Embedded OpenType Fonts

24) What are 2D transforms in CSS3?

A) In CSS3, by using 2D transforms we can re-change the element structure as translate, rotate, scale, and skew.

25) What are the common values used in 2D Transforms?

A) Here are the some commonly used values in 2D Transforms,

matrix(n,n,n,n,n,n) – Used to defines matrix transforms with six values
translate(x,y)- Used to transforms the element along with x-axis and y-axis
translateX(n) – Used to transforms the element along with x-axis
translateY(n) – Used to transforms the element along with y-axis
scale(x,y) – Used to change the width and height of element
scaleX(n) – Used to change the width of element
scaleY(n) – Used to change the height of element
rotate(angle) – Used to rotate the element based on an angle
skewX(angle) – Used to defines skew transforms along with x axis
skewY(angle) – Used to defines skew transforms along with y axis

26) What are 3D transforms in CSS3?

A) By using 3D transforms, we can move element to x-axis, y-axis and z-axis.

27) What are the common values used in 3D Transforms?

A) Here are the some commonly used values in 3D Transforms,

matrix3d(n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n) – Used to transforms the element by using 16 values of matrix
translate3d(x,y,z) – Used to transforms the element by using x-axis,y-axis and z-axis
translateX(x) – Used to transforms the element by using x-axis
translateY(y) – Used to transforms the element by using y-axis
translateZ(z) – Used to transforms the element by using y-axis
scaleX(x) – Used to scale transforms the element by using x-axis
scaleY(y) – Used to scale transforms the element by using y-axis
scaleY(y) – Used to transforms the element by using z-axis
rotateX(angle) – Used to rotate transforms the element by using x-axis
rotateY(angle) – Used to rotate transforms the element by using y-axis
rotateZ(angle) – Used to rotate transforms the element by using z-axis

28) What are the CSS3 Animations?

A) In CSS3 Animation is process of making shape changes and creating motions with elements.
@keyframes – Keyframes will control the intermediate animation steps in CSS3.

29) How can you create Multi Columns in CSS3?

A) In CSS3, Multi Columns feature allows users to create, text as news paper structure in multi columns.

30) What are the values associated with multi columns?

A) Here is the list of most commonly used multi column values, they are:

column-count – Used to count the number of columns that element should be divided
column-fill – Used to decide, how to fill the columns
column-gap – Used to decide the gap between the columns
column-rule – Used to specifies the number of rules
rule-color – Used to specifies the column rule color
rule-style – Used to specifies the style rule for column
rule-width – Used to specifies the width
column-span – Used to specifies the span between columns

CSS3 Technical Interview Questions And Answers

31) Can you write CSS3 code to arrange text in multi columns?

A) Here is the code for arranging text in multi columns,

<style>
.multi {
/* Column count property */
-webkit-column-count: 4;
-moz-column-count: 4;
column-count: 4;

/* Column gap property */
-webkit-column-gap: 40px;
-moz-column-gap: 40px;
column-gap: 40px;

/* Column style property */
-webkit-column-rule-style: solid;
-moz-column-rule-style: solid;
column-rule-style: solid;
}
</style>

32) What is CSS3 Outline offset?

A) CSS3 outline, draws a line around the element at outside of boarder.

Sample Code for creating Outline:

<style>
div {
margin: 20px;
padding: 10px;
width: 300px;
height: 100px;
border: 5px solid pink;
outline: 5px solid green;
outline-offset: 15px;
}
</style>

33) What is Box sizing property?

A) Box sizing property is using to change the height and width of element.

Example Code for CSS3 Box sizing:

<style>
.div1 {
width: 300px;
height: 100px;
border: 1px solid blue;
box-sizing: border-box;
}
.div2 {
width: 300px;
height: 100px;
padding: 50px;
border: 1px solid red;
box-sizing: border-box;
}
</style>

34) What is CSS3 Responsive Web Design?

A) CSS3 Responsive web design provides an optimal experience for the user. Responsive design allows users easy reading and easy navigation with a minimum of resizing on different devices.
The best thing about web responsive design is, it will changes the height and width of the website automatically to fit the device screen (desktop, laptop, tablets and mobiles) to provide best user experience to the user.

35) What is CSS unicode-bidi Property?

A) The unicode-bidi property is used together with the direction property to set or return whether the text should be overridden to support multiple languages in the same document.

CSS unicode-bidi property example:

div {
direction: rtl;
unicode-bidi: bidi-override;
}

36) What is CSS transition-timing-function Property?

A) The transition-timing-function property specifies the speed curve of the transition effect. This property allows a transition effect to change speed over its duration.

Example:

div {
transition-timing-function: linear;
}

37) What is CSS text-indent Property?

A) The text-indent property specifies the indentation of the first line in a text-block.

Example:

p {
text-indent: 50px;
}

38) What is CSS transform-origin Property?

A) The transform-origin property allows you to change the position of transformed elements. 2D transformations can change the x- and y-axis of an element. 3D transformations can also change the z-axis of an element.

Example:

div {
transform: rotate(45deg);
transform-origin: 20% 40%;
}

39) What is CSS hanging-punctuation Property?

A) The hanging-punctuation property specifies whether a punctuation mark may be placed outside the line box at the start or at the end of a full line of text.

Example:

p {
hanging-punctuation: first;
}

40) What is CSS counter-increment Property?

A) The counter-increment property increases or decreases the value of one or more CSS counters. The counter-increment property is usually used together with the counter-reset property and the content property.

Example:

body {
/* Set “my-sec-counter” to 0 */
counter-reset: my-sec-counter;
}

h2:before {
/* Increment “my-sec-counter” by 1 */
counter-increment: my-sec-counter;
content: “Section ” counter(my-sec-counter) “. “;
}

CSS Interview Questions For Experienced

41) What is CSS background-attachment Property?

A) The background-attachment property sets whether a background image scrolls with the rest of the page, or is fixed.

Example:

body{
background-image: url(“img_tree.gif”);
background-repeat: no-repeat;
background-attachment: fixed;
}

42) What is CSS backface-visibility Property?

A) The backface-visibility property defines whether or not the back face of an element should be visible when facing the user. The back face of an element is a mirror image of the front face being displayed. This property is useful when an element is rotated.

Example:

#div1 {
backface-visibility: hidden;
}
#div2 {
backface-visibility: visible;
}

43) What are CSS functions?

A) CSS functions are used as a value for various CSS properties.

attr()
calc()
cubic-bezier()
hsl()
hsla()
linear-gradient()
radial-gradient()
repeating-linear-gradient()
repeating-radial-gradient()
rgb()
rgba()
var()

44) What is CSS attr() funtion?

A) The attr() function returns the value of an attribute of the selected elements.

Example: a:after {
content: ” (” attr(href) “)”;
}

45) What is CSS calc() function?

A) The calc() function performs a calculation to be used as the property value.

Example: #div1 {
position: absolute;
left: 50px;
width: calc(100% – 100px);
border: 1px solid black;
background-color: yellow;
padding: 5px;
text-align: center;
}

46) What is the cubic-bezier() function?

A) The cubic-bezier() function defines a Cubic Bezier curve.

Example:

div {
width: 100px;
height: 100px;
background: red;
transition: width 2s;
transition-timing-function: cubic-bezier(0.1, 0.7, 1.0, 0.1);
}

47) What is the CSS3 hsl() function?

A) The hsl() function define colors using the Hue-saturation-lightness model (HSL). HSL stands for hue, saturation, and lightness – and represents a cylindrical-coordinate representation of colors.

Example:

#p1 {background-color:hsl(120,100%,50%);} /* green */
#p2 {background-color:hsl(120,100%,75%);} /* light green */
#p3 {background-color:hsl(120,100%,25%);} /* dark green */
#p4 {background-color:hsl(120,60%,70%);} /* pastel green */

48) What is CSS3 hsla() Function?

A) The hsla() function define colors using the Hue-saturation-lightness-alpha model (HSLA). HSLA color values are an extension of HSL color values with an alpha channel – which specifies the opacity of the color.

Example:

#p1 {background-color:hsla(120,100%,50%,0.3);} /* green */
#p2 {background-color:hsla(120,100%,75%,0.3);} /* light green */
#p3 {background-color:hsla(120,100%,25%,0.3);} /* dark green */
#p4 {background-color:hsla(120,60%,70%,0.3);} /* pastel green */

49) What is CSS linear-gradient() Function?

A) The linear-gradient() function sets a linear gradient as the background image. To create a linear gradient you must define at least two color stops.

Example:

#grad {
background: linear-gradient(red, yellow, blue);
}

50) What is CSS radial-gradient() Function?

A) The radial-gradient() function sets a radial gradient as the background image. A radial gradient is defined by its center. To create a radial gradient you must define at least two color stops.

Example:

#grad {
background: radial-gradient(red, green, blue);
}

References: Thoughtco | Tutorialspoint | W3Schools

OTHER INTERVIEW QUESTIONS

  1. Linux Administrator Interview Questions
  2. SQL Interview Questions
  3. Hibernate Interview Questions
  4. Kubernetes Interview Questions
  5. Kibana Interview Questions
  6. Nagios Interview Questions
  7. Jenkins Interview Questions
  8. Chef Interview Questions
  9. Puppet Interview Questions
  10. RPA Interview Questions And Answers
  11. Android Interview Questions
  12. Mulesoft Interview Questions
  13. JSON Interview Questions
  14. PeopleSoft HRMS Interview Questions
  15. PeopleSoft Functional Interview Questions
  16. PeopleTools Interview Questions
  17. Peoplesoft Technical Interview Questions
  18. 199 Peoplesoft Interview Questions
  19. 200 Blue Prism Interview Questions
  20. Visualforce Interview Questions
  21. Salesforce Interview Questions
  22. 300 SSIS Interview Questions
  23. PHP Interview Questions And Answers
  24. Alteryx Interview Questions
  25. AWS Cloud Support Interview Questions
  26. Google Kubernetes Engine Interview Questions
  27. AWS Devops Interview Questions
  28. Apigee Interview Questions
  29. Actimize Interview Questions
  30. DB2 Interview Questions

35 SIEM Tools List For Security Information And Event Management

35 SIEM Tools List For Security Information Management. SIEM combines SIM (security information management) and SEM (security event management) functions into one security information and event management system. Here Coding compiler sharing a very good list of SIEM Tools for security information management. Let’s start learning about SIEM Tools.

SIEM Tools

  1. IBM QRadar Security Intelligence Platform
  2. Splunk
  3. ArcSight ESM Software
  4. NetIQ / Micro Focus
  5. Trustwave
  6. Alienvault
  7. AccelOps
  8. BlackStratus
  9. EventTracker
  10. Intel Security Group

SIEM Tools List

Let’s start learning about 35 SIEM Tools.

1) IBM QRadar Security Intelligence Platform

IBM QRadar Security Intelligence Platform – IBM QRadar Security Intelligence Platform provides a unified architecture for integrating SIEM solutions for advanced threat protection.

2) Splunk SIEM Tool

Splunk – Splunk Inc. provides the leading platform for Operational Intelligence. Customers use Splunk to search, monitor, analyze and visualize machine data.

3) ArcSight ESM Software

ArcSight ESM Software – Discover the HP ArcSight ESM software solution is now part of Micro Focums. ArcSight is an enterprise security management system for event correlation, compliance monitoring and compliance reporting.

https://software.microfocus.com/en-us/products/siem-security-information-event-management/overview

4) NetIQ / Micro Focus SIEM Tool

NetIQ / Micro Focus – NetIQ provides proven IT system management, security management, and performance management software for the modern enterprise.

https://www.netiq.com/

5) Trustwave SIEM Tool

Trustwave – Trustwave helps businesses fight cybercrime, protect data and reduce security risk. We give organizations the services and technologies they need to transform the way they plan, prepare, integrate and manage their information security and compliance programs.

https://www.trustwave.com/home/

6) Alienvault SIEM Tool

Alienvault – Within minutes of installing the USM product, our asset discovery features – Active Network Scanning, Passive Network Monitoring, Asset Inventory, Host-based Software Inventory – will provide you visibility into the assets on your network, what software is installed on them, how they’re configured, any potential vulnerabilities and active threats being executed against them.

https://www.alienvault.com/products

7) AccelOps SIEM Tool

AccelOps – SIEM software and network monitoring solutions for cloud and virtualized infrastructures are available online at AccelOps. Start your free trial today.

https://www.fortinet.com/products/siem/fortisiem.html

8) BlackStratus SIEM Tool

BlackStratus -The most reliable security information event management (SIEM) products & solutions. Test our technologies by downloading our virtual SIEM system for free!

9) EventTracker SIEM Tool

EventTracker – EventTracker software provide complete solution for SIEM, IT Compliance audit, Log Management Tool, IT Security and System monitoring.

https://www.eventtracker.com/

10) Intel Security Group SIEM Tool

Intel Security Group – Intel Security combines the security expertise of McAfee with the innovation, performance, and trust of Intel, with the goal of delivering integrated security solutions across every architecture from chip to cloud.

https://www.intel.com/content/www/us/en/security/hardware/hardware-security-overview.html

Security Information And Event Management Tools

11) LogRhythm SIEM Tool

LogRhythm – LogRhythm provides log and event management, log analysis, SIEM and automated remediation, for enterprise-class organizations, offering an integrated solution for monitoring and compliance.

https://logrhythm.com/index.html

12) LayerX Technologies SIEM Tool

LayerX technologies – Enable the mass utilization of your company’s natural resources. ANY data format (structured and unstructured)…you can stream it, push it, pull it, or let us go grab it for you. Oh, by the way, you can send us UNLIMITED amounts of big data.

http://www.layerxtech.com/index.php

13) SolarWinds SIEM Tool

SolarWinds – SolarWinds Log & Event Manager – Collect, manage, search, and correlate logs to improve security, enhance troubleshooting, and pass compliance audits.

https://www.solarwinds.com/siem-security-information-event-management-software

14) LogLogic | TIBCO SIEM Tool

LogLogic – LogLogic is a centralized log data management solution that supplies the fuel for operation intelligence.

https://www.tibco.com/resources/datasheet/tibco-loglogic-log-management-intelligence

15) Tenable SecurityCenter Family SIEM Tool

Tenable SecurityCenter Family – See how SecurityCenter or SecurityCenter Continuous View can work for your organization. Schedule a Demo Business and executive ready security metrics. Get immediate sales assistance or more information on SecurityCenter Continuous View.

https://www.tenable.com/products/securitycenter

16) FairWarning | Data Protection for EHRs and Salesforce

FairWarning – FairWarning solutions deliver data protection and governance for mission critical applications such as Electronic Health Records and cloud-based applications such as Salesforce.

17) LookWise SIEM Tool

LookWise – Lookwise solutions is a company dedicated to developing products that respond to the needs of organizations in the management of security, Big Data and regulatory compliance.

https://www.s21sec.com/en/

18) Tripwire Log Center SIEM Tool

Tripwire Log Center – Get to the bottom of the situation. With Tripwire Log Center, you get a combination of details from suspicious events across your enterprise devices with in-depth knowledge from Tripwire Enterprise and Tripwire IP360. This tight integration of security controls allows you to better prioritize security threats based on real risks.

https://www.tripwire.com/products/tripwire-log-center/

19) Tango/04 SIEM Tool

Tango/04 – We identify, alert and resolve problems in critical Online Services and Business Processes, helping your business to run smoothly, without interruptions, in a safe environment with extreme visibility.

http://www.tango04.com/

20) Huntsman Enterprise SIEM Tool

Huntsman Enterprise SIEM – The Huntsman Enterprise SIEM: Shortens the time from threat detection to resolution Automates the collection of contextual information relating to a threat Speeds up the investigative process Delivers precise security information to operations, management and audit stakeholders.

List Of SIEM Tools

21) ManageEngine Event Log Management Software

ManageEngine Event Log Management Software – Your organizations IT infrastructure generate huge amount of logs every day and these machine generated logs have vital information that can provide powerful insights and network security intelligence into user behaviors, network anomalies, system downtime, policy violations, internal threats, regulatory compliance, etc.

https://www.manageengine.com/products/eventlog/

22) MacAfee SIEM Tool

MacAfee – Our high performance, powerful SIEM brings event, threat and risk data together to provide strong security intelligence, rapid incident response, seamless log management and extensible compliance reporting. Our high performance, powerful SIEM brings event, threat and risk data together to provide strong security intelligence, rapid incident response, seamless log management and extensible compliance reporting.

https://www.mcafee.com/us/products/siem/index.aspx

23) Symantec SIEM Tool

Symantec – Check out how Symantec Endpoint Protection performs against competing solutions. Small Business Test Results Enterprise Test Results Measuring the Performance of Endpoint Security Solutions This recorded webcast examines how performance of security solutions should be measured as well as the true performance cost of endpoint security.

https://www.symantec.com/

24) Alert Logic SIEM Tool

Alert Logic – Alert Logic Log Manager collects and normalizes your data, while our 24×7 expert monitoring and analysis adds human intelligence to find key insights.

https://www.alertlogic.com/solutions/log-correlation-and-analysis/

25) CorreLog – CA Technologies SIEM Tool

CorreLog – CorreLog is a privately held corporation, has produced software and framework components used successfully by hundreds of private and government entities worldwide. We are the leading independent software vendor offering solutions that seamlessly connect mainframe and distributed SIEM technologies for one view of cross-platform IT security.

https://www.ca.com/us.html

26) Sophos SIEM Tool

Sophos – Sophos Makes Data Security Simple for Business. Complete DLP Protection with Endpoint, Cloud Antivirus, Encryption, UTM Firewall, Web, Email, Mobile, Server, Wi-Fi Security and Network Storage Protection.

https://www.sophos.com/en-us.aspx

27) EiQ Networks SIEM Tool

EiQ Networks – EiQ Networks is a pioneer in simplified security, risk and compliance solutions. Learn more about SIEM Security products, SIEM tools & SIEM platforms.

https://www.cygilant.com/

28) Extreme Networks SIEM Tool

Extreme Networks – IdentiFi is a leader in high-density deployments providing next generation Wi-Fi today. Proven in the most demanding environments, IdentiFi delivers an exceptional experience for BYOD/Mobile users wherever they may roam. IdentiFi includes access points, centralized management, and appliances that bring the performance and scalability required to meet high user demand, even in the most challenging environments.

29) GFI EventsManager SIEM Tool

GFI EventsManager – GFI EventsManager performs network wide log monitoring, management and archiving, and offers event log based intrusion detection.

https://www.gfi.com/products-and-solutions/network-security-solutions/gfi-eventsmanager

30) Juniper Networks SIEM Tool

Juniper Networks – Juniper provides leading security information & event management (SIEM) that consolidates large volumes of data from thousands devices in near real time.

https://www.juniper.net/us/en/products-services/security/secure-analytics/

SIEM Vendor List

31) BlackStratus Systems & Technologies SIEM Tool

BlackStratus Systems &amp; Technologies – The most reliable security information event management (SIEM) products & solutions. Test our technologies by downloading our virtual SIEM system for free!

32) Prism EventTracker Enterprise SIEM List

Prism EventTracker Enterprise – The common element in the continually changing security environment is the loss of control. Ownership no longer means security or trust. Information can be stolen, manipulated and altered. Threats are no longer just external, but can be internal assets – employees who unwittingly, or deliberately – place the enterprise’s security in jeopardy.

https://www.eventtracker.com/solutions/co-managed-siem/

33) Dell Software / Quest Intrust SIEM Tool

Dell Software / Quest Intrust – Securely collect, store, and receive event data from Windows, Unix and Linux system. InTrust enables you to securely collect, store, search and analyze massive amounts of IT data from numerous data sources, systems and devices in one place. Get real-time insights into user activity for security, compliance and operational visibility.

https://www.quest.com/products/intrust/

34) RSA – EMC SIEM Tool

RSA – EMC – Need help immediately? EMC Sales Specialists are standing by to answer your questions real time. Use Live Chat for fast, direct access to EMC Customer Service Professionals to resolve your support questions. Explore and compare EMC products in the EMC Store, and get a price quote from EMC or an EMC partner.

https://www.rsa.com/

35) WALLIX  SIEM Tool

WALLIX – WALLIX Group is a cybersecurity software vendor dedicated to defending and fostering organizations’ success and renown against the cyberthreats they are facing. For over a decade, WALLIX has strived to protect companies, public organizations, as well as service providers’ most critical IT and strategic assets against data breaches, making it one of the world leaders in Privileged Access Management.

OTHER INTERVIEW QUESTIONS

  1. Linux Administrator Interview Questions
  2. SQL Interview Questions
  3. Hibernate Interview Questions
  4. Kubernetes Interview Questions
  5. Kibana Interview Questions
  6. Nagios Interview Questions
  7. Jenkins Interview Questions
  8. Chef Interview Questions
  9. Puppet Interview Questions
  10. RPA Interview Questions And Answers
  11. Android Interview Questions
  12. Mulesoft Interview Questions
  13. JSON Interview Questions
  14. PeopleSoft HRMS Interview Questions
  15. PeopleSoft Functional Interview Questions
  16. PeopleTools Interview Questions
  17. Peoplesoft Technical Interview Questions
  18. 199 Peoplesoft Interview Questions
  19. 200 Blue Prism Interview Questions
  20. Visualforce Interview Questions
  21. Salesforce Interview Questions
  22. 300 SSIS Interview Questions
  23. PHP Interview Questions And Answers
  24. Alteryx Interview Questions
  25. AWS Cloud Support Interview Questions
  26. Google Kubernetes Engine Interview Questions
  27. AWS Devops Interview Questions
  28. Apigee Interview Questions
  29. Actimize Interview Questions
  30. DB2 Interview Questions

RHEL 6 vs RHEL 7 – Difference Between RHEL 6 And RHEL 7

RHEL 6 vs RHEL 7 – The Difference Between RHEL 6 and RHEL 7. Here Coding compiler sharing a blog post on key differences between RHEL 6 and RHEL 7. There are many changes from RHEL 6 to RHEL 7 to meet the industry requirements.

RHEL 6 vs RHEL 7

When compare RHEL 6 and RHEL 7, Red Hat Enterprise Linux 7 is a Linux-based operating system from Red Hat designed for businesses. RHEL can work on desktops, on servers, in hypervisors or in the cloud. RHEL 7 is very lightweight and container-based.

Difference Between RHEL 6 And RHEL 7

Let’s discuss the different features of RHEL 6 and RHEL 7.

Related Article: Linux Administration Interview Questions

Default File System

RHEL 6 – Ext4
RHEL 7 – XFS

Kernel Version

RHEL 6 – 2.6.xx
RHEL 7 – 3.10.xx

Release Name

RHEL 6 – Santiago
RHEL 7 – Maipo

Gnome Version

RHEL 6 – GNOME 2
RHEL 7 – GNOME 3.8

KDE Version

RHEL 6 – KDE 4.1
RHEL 7 – KDE 4.6

NFS Version

RHEL 6 – NFS 4
RHEL 7 – NFS 4.1. NFS V2 is deprecated in RHEL 7

Samba Version

RHEL 6 – SMB 3.6
RHEL 7 – SMB 4.4

Default Database

RHEL 6 – MySQL
RHEL 7 – MariaDB

Cluster Resource Manager

RHEL 6 – Rgmanager
RHEL 7 – Pacemaker

Network Interface Grouping

RHEL 6 – Bonding can be done as Active-Backup, XOR, IEEE and Load Balancing
RHEL 7 – Team Driver will support multiple types of Teaming methods called Active-Backup, Load-balancing and Broadcast

KDUMP

RHEL 6 – Kdump does’t support with large RAM Size
RHEL 7 – RHEL 7 can be supported up to 3TB

Boot Loader

RHEL 6 – Grub 2 /boot/grub2/grub.cfg
RHEL 7 – Grub 0.97 /boot/grub/grub.conf

File System Check

RHEL 6 – e2fsck
-Inode check. Block and size check
–Directory Structure check
-Directory Link Check
-reference count check
-Group Summary Check

RHEL 7 – xfs_replair
– Inode blockmap checks
-Inode allocation map checks
-Inode size check
-Directory check
-Path Name check
-Link count check
-Freemap check
-Super block check

Process ID

RHEL 6 – Initd Process ID 1
RHEL 7 – Systemd Process ID 1

Port Security

RHEL 6 – Iptables by default service port is enabled when service is switched on.
RHEL 7 – Firewalld instead of iptables. Iptables can also support with RHEL 7, but we can’t use both of them at the same time. Firewall will not allow any port until and unless you enabled it.

Boot Time

RHEL 6 – 40 Sec
RHEL 7 – 20 Sec

File System Size

RHEL 6 – EXT4 16TB with XFS 100TB
RHEL 7 – XFS 500TB with EXT4 16TB

Processor Architecture

RHEL 6 – 32Bit and 64Bit
RHEL 7 – Only 64Bit

Network Configuration Tool

RHEL 6 – setup
RHEL 7 – nmtui

Hostname Config File

RHEL 6 – /etc/sysconfig/network
RHEL 7 – /etc/hostname No need to edit hostname file to write permanent hostname simply use hostnamectl command

Interface Name

RHEL 6 – eth0
RHEL 7 – ens33xxx

Managing Services

RHEL 6 – service sshd start
service sshd restart
chkconfig sshd on

RHEL 7 – systemctl start sshd.service
systemctl restart sshd.service
systemctl enable sshd.service

System Logs

RHEL 6 – /var/log/
RHEL 7 – /var/log
journalctl

Run Levels

RHEL 6 – runlevel 0 – Power Off
runlevel 1 – Single User Mode
runlevel 2 – Multi User without Networking
runlevel 3 – Multi User CLI
runlevel 4 – Not USed
runlevel 5 – GUI Mode
runlevel 6 – Restart

RHEL 7 – There is no run levels in RHEL 7. Run levels are called as targets
Poweroff.target
rescue.target
multi-user.target
graphical.target
reboot.target

UID Information

RHEL 6 – Normal User UID will start from 500 to 65534
System Users UID will start from 1 to 499

RHEL 7 – Normal User UID start from 1000 – 65534
System Users UID will start from 1 to 999Because Services are increased compare to RHEL 6

By Pass Root Password Prompt

RHEL 6 – append 1 or s or init=/bin/bash to Kernel command line
RHEL 7 – Append rd.break or init=/bin/bash to kernel command line

Rebooting and Poweroff

RHEL 6 – poweroff – init 0
reboot – init 6

RHEL 7 – systemctl poweroff
systemctl reboot

YUM Commands

RHEL 6 -yum groupinstall
yum groupinfo

RHEL 7 – yum group install
yum group info

Extracting Initramfs Image

RHEL 6 – gunzip
gunzip -c /boot/initramfs-$(uname -r).img | cpio -i -d

RHEL 7 – skipcpio
/usr/lib/dracut/skipcpio /boot/initramfs-$(uname -r).img | gunzip -c | cpio -id

Default Inode Size

RHEL 6 – 256 bytes

[root@local ~]# tune2fs -l /dev/sda1|grep -i ‘inode size’

Inode size: 128

RHEL 7 – 512 bytes

[root@managed1 ]# xfs_info /dev/sda1|grep isize

meta-data=/dev/sda1 isize=512 agcount=4, agsize=65536 blks

Iostat Command

Now, in RHEL7.x there is a separate r_await (read await) & w_await (write await) added along with “await” which produces total (changed in sysstat version 10). It is just “await” parameter to get total average time in milliseconds which took to complete IO requests in case of RHEL6.x version.

Network Persistent Device File

RHEL 6 – maintains persistent in network/device
RHEL 7 – maintains persistent in /etc/udev/rules.d/70-persistent-network.rules

Free Command

RHEL 6 – used = total – free
RHEL 7 – used = total – free – buff/cache

Resizing an Lvm

RHEL 6 – EXT family of file systems could be resized if built on a logical volume as a block device.

RHEL 7 – As with XFS file system, resize is not possible.

Dmesg Command

RHEL 6 – “dmesg” command belongs to “util-linux-ng” package and which by default doesn’t record time stamp and hence, data produced doesn’t state when those messages are generated.

RHEL 7 – The new “util-linux” package to which “dmesg” command belongs to can print time-stamp along with messages as storaged in /var/log/dmesg. Now, users can print human readable kernel ring buffer messages using “dmesg -T” command. Most of the user utility commands under /bin are moved to /usr/bin in RHEL7.x architecture.

Sources: Arkit | Simplylinuxfaq

OTHER INTERVIEW QUESTIONS

  1. Linux Administrator Interview Questions
  2. SQL Interview Questions
  3. Hibernate Interview Questions
  4. Kubernetes Interview Questions
  5. Kibana Interview Questions
  6. Nagios Interview Questions
  7. Jenkins Interview Questions
  8. Chef Interview Questions
  9. Puppet Interview Questions
  10. RPA Interview Questions And Answers
  11. Android Interview Questions
  12. Mulesoft Interview Questions
  13. JSON Interview Questions
  14. PeopleSoft HRMS Interview Questions
  15. PeopleSoft Functional Interview Questions
  16. PeopleTools Interview Questions
  17. Peoplesoft Technical Interview Questions
  18. 199 Peoplesoft Interview Questions
  19. 200 Blue Prism Interview Questions
  20. Visualforce Interview Questions
  21. Salesforce Interview Questions
  22. 300 SSIS Interview Questions
  23. PHP Interview Questions And Answers
  24. Alteryx Interview Questions
  25. AWS Cloud Support Interview Questions
  26. Google Kubernetes Engine Interview Questions
  27. AWS Devops Interview Questions
  28. Apigee Interview Questions
  29. Actimize Interview Questions
  30. DB2 Interview Questions
  31. AnthillPro Interview Questions
  32. Angular 2 Interview Questions

75 Linux Administrator Interview Questions And Answers

Linux Administrator Interview Questions And Answers For Experienced 2018. Here Coding compiler sharing a list of 75 Real-Time Linux Administration Interview Questions and answers for freshers and experienced.

These Linux questions were asked in various companies like IBM, TCS, Infosys, and Accenture for Linux administration interviews. Linux system admin interview questions prepared by industry experts, we hope that these Linux admin questions will help you to crack your next Linux administrator job interview. All the best for your future and happy Linux learning.

Linux Administrator Interview Questions

  1. Which files stores the user min UID, max UID, password expiration settings, password encryption method being used etc.,?
  2. How do you make a file copied to a new user account automatically upon user account creation?
  3. List the fields in /etc/passwd file.
  4. How to lock an user account?
  5. How to disable user login via terminals?
  6. Which commands are normally recommended to edit “/etc/passwd”, “/etc/shadow”, “/etc/group” and “/etc/gshadow” files?
  7. How do you make/grant complete access (rwx) on files created for a user and deny any level of access to others including group?
  8. How to check if an user account has been locked?
  9. How to find out the shadow password encryption method being used in Linux? How could this be changed (example : from md5 to sha512)?
  10. What are the possible causes when an user failed to login into a Linux system (physical/remote console); despite providing proper credentials?

Linux Administrator Interview Questions And Answers

Let’s start learning Linux Administration Interview Questions and Answers for experienced.

Linux User Management Interview Questions

1) Which files stores the user min UID, max UID, password expiration settings, password encryption method being used etc.,?

ANS : /etc/login.defs

2) How do you make a file copied to a new user account automatically upon user account creation?

ANS : Store the file in /etc/skel directory.

3) List the fields in /etc/passwd file.

ANS : UserName | Password | UserID | GroupID | Comments | HomeDir | LoginShell

<Couple of lines from /etc/passwd file are pasted below for reference>

redhat:x:500:500:Redhat User:/home/redhat:/bin/bash

mssm:x:501:501:another user:/home/mssm:/bin/bash

– “x” in the password column indicates that the encrypted password is stored in /etc/shadow file.

4) How to lock an user account?

ANS: This can be done by using either “usermod -L <UserName>” or “passwd -l <UserName>” commands.

Example:-

#usermod -L mango

Once an account gets locked, there would be an exclamation mark before the encrypted password files in “/etc/shadow” as shown below:

mango:!$1$O5zV5Rj/$XhuRe8Og.AiXMXDGSIsae/:16266:0:99999:7:::

To un-lock an account:-

#usermod -U mango

5) How to disable user login via terminals?

ANS: Add “/sbin/nologin” field instead of “/bin/bash” in “/etc/passwd” file.

Linux Administrator Interview Questions And Answers For Frehsers

6) Which commands are normally recommended to edit “/etc/passwd”, “/etc/shadow”, “/etc/group” and “/etc/gshadow” files?

ANS: vipw > edit the user password file (/etc/passwd)
vigr > edit the user group file(/etc/group)
vipw -s > to edit shadow password file (/etc/shadow)
vigr -s > to edit shadow group file (/etc/gshadow)

These commands would normally lock the file while editing to avoid corruption.

7) Whenever an user tries to login via terminal, system would throw up the error “The account is currently not available”, otherwise, via GUI when user enters password, it looks to be logging in, however, comes back to the login prompt. How could this issue be fixed?

ANS: This is because of the shell field set as “/sbin/nologin” in “/etc/passwd” file, so change this back to “/bin/bash” and user should be allowed to login.

If the shell field is set as “/bin/false” then whenever an user tries to login there would not be any error or messages, it just comes back to the login prompt and same happens in GUI mode.

(8) How do you make a new user to reset his password upon his first login?

{ The prompt should come up like below }

[redhat@localhost ~]$ su – mango
Password:
You are required to change your password immediately (root enforced)
Changing password for mango.
(current) UNIX password:

{ The prompt should come up like above }

ANS: Use ‘chage’ command and set the expiration date as given below

[root@localhost skel]# chage -d 0 mango

<< To view password aging details >>

[root@localhost skel]# chage -l mango
Last password change : password must be changed
Password expires : password must be changed
Password inactive : password must be changed
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7

(9) Create users home directory in /home1 directory instead of default /home directory. This gets applicable to any new users who gets created i.e the home directory of that user should be /home1/<UserName>/

ANS: – Edit /etc/default/useradd

– Change the line : HOME=/home1

– Save the changes and exit. After this any new users home directory would be under /home1

– You could check the useradd defaults using the command :#useradd -D

OR

#cat /etc/default/useradd

After this you can add users with the command “useradd <UserName>”. This would create the users home directory with the name of the user under the specified HOME directory as defined in /etc/default/useradd.

EXAMPLE:- adding user with “-d”

[root@Redhat5Lvm ~]# useradd -d /root/doctor alldoctors
[root@Redhat5Lvm ~]# grep alldoctors /etc/passwd
alldoctors:x:912:913::/root/doctor:/bin/bash

[root@Redhat5Lvm ~]# ls -ali /root/doctor/
total 28
607780 drwx—— 3 alldoctors alldoctors 4096 Aug 3 00:31 .
543457 drwxr-x— 18 root root 4096 Aug 3 00:31 ..
608253 -rw-r–r– 1 alldoctors alldoctors 33 Aug 3 00:31 .bash_logout
608252 -rw-r–r– 1 alldoctors alldoctors 176 Aug 3 00:31 .bash_profile
608251 -rw-r–r– 1 alldoctors alldoctors 124 Aug 3 00:31 .bashrc
608248 drwxr-xr-x 4 alldoctors alldoctors 4096 Aug 3 00:31 .mozilla

(10) How do you make/grant complete access (rwx) on files created for a user and deny any level of access to others including group?

ANS : – Need to define the umask value for the required user.
– This can be done by editing .bash_profile file.

For example, if we need to define this for a user “mmurthy” then we need to edit this file “/home/mmurthy/.bash_profile” and define umask as given below (assuming that the default home directory location is not changed):

umask 0077

– Save and exit the file.
– Next time this user logs in, files/directories would get exclusive permissions only for this user as masked by umask parameter.
– For root user the umask is defined in “/etc/init.d/functions” file. Otherwise, in /etc/profile (login shell) or /etc/bashrc (non-login shell) file.

Linux System Admin Interview Questions And Answers

(11) How to check if an user account has been locked?

ANS:- Run the command “passwd -S <UserName>”, this would show if the password has been locked or not. Otherwise, grep for the username from /etc/shadow file and you could see “!” mark prefixed to the encrypted password field.

[root@server6 ~]# passwd -S smurthy
smurthy LK 1970-01-01 0 99999 7 -1 (Password locked.)

[root@server6 ~]# grep smurthy /etc/shadow
smurthy:!!$6$jZqvS4ju$k.o6o7OoL7EZ1Bn52uPKeI2gqA76A7qyTl2PM8192jF2mz4ssVTz/u8DfbY2zJ7xCjFymh5FuATWxW5RxFugM1:0:0:99999:7:::

If you notice a double exclamation mark here (“!!”) this indicates that the account got locked-up by running the command “passwd -l <UserName>” command (available only for root user). Otherwise, a single exclamation mark indicates that the account got locked with the command “usermod -L <UserName>”. Accounts locked with usermod command would record it in /var/log/secure file by default.

To “unlock” an user account, run this command “passwd -u <UserName”>. Otherwise, run “usermod -U <UserName” command twice to get rid off double exclamation marks in the encrypted password field.

Otherwise, “usermod -U <UserName” would unlock an account locked by the “usermod -L <UserName>” command.

EXAMPLE:-

[root@server6 ~]# grep smurthy /etc/shadow
smurthy:!!$6$jZqvS4ju$k.o6o7OoL7EZ1Bn52uPKeI2gqA76A7qyTl2PM8192jF2mz4ssVTz/u8DfbY2zJ7xCjFymh5FuATWxW5RxFugM1:0:0:99999:7:::

[root@server6 ~]# passwd -S smurthy
smurthy LK 1970-01-01 0 99999 7 -1 (Password locked.)

[root@server6 ~]# passwd -u smurthy
Unlocking password for user smurthy.
passwd: Success

[root@server6 ~]# grep smurthy /etc/shadow
smurthy:$6$jZqvS4ju$k.o6o7OoL7EZ1Bn52uPKeI2gqA76A7qyTl2PM8192jF2mz4ssVTz/u8DfbY2zJ7xCjFymh5FuATWxW5RxFugM1:0:0:99999:7:::

[root@server6 ~]# passwd -S smurthy
smurthy PS 1970-01-01 0 99999 7 -1 (Password set, SHA512 crypt.)

(12) How to find out the shadow password encryption method being used in Linux? How could this be changed (example : from md5 to sha512)?

ANS:- We can find out the password encryption method being used for shadow passwords as shown below:

– Check in /etc/login.defs

[root@server8 ~]# grep -i crypt /etc/login.defs
# Use SHA512 to encrypt password.
ENCRYPT_METHOD MD5
MD5_CRYPT_ENAB yes

OR

– Check using “authconfig” command:
[root@server8 ~]# authconfig –test|grep hashing
password hashing algorithm is md5

OR

– Check the password beginning character in the second field of /etc/shadow file:

If it begins with = $6 > indicates sha512
$5 > sha256
$1 > md5
Examples:

ty2:$6$EyoeIHFK$L2PAXcXRo.Q5Y7zUweYkste8PtiL/CqYJ9Z/ydBvRIOqvsegpVtOU1hDfkFdUpTcmjEou4kzL/Ej5MF2HdAB7.:16378:3:100:7::16489:
ty3:$5$Bsv43yG6$/Oa4fhlKF65XW8ROohKnJaSxVIIEhUKFUEdiIcOEfY4:16378:0:99999:7:::
ty5:$1$5J4jzULD$dKGfhSIzXp50Y4mwZxcqB/:16379:0:99999:7:::

To Change Password Encryption Method to sha512:

#authconfig –passalgo=sha512 –update {this would change the password encryption method to sha512}

Verify if it got changed successfully:

[root@server8 ~]# grep -i crypt /etc/login.defs
# Use SHA512 to encrypt password.
ENCRYPT_METHOD SHA512
MD5_CRYPT_ENAB no

[root@server8 ~]# authconfig –test|grep hashing

password hashing algorithm is sha512

(13) What are the possible causes when an user failed to login into a Linux system (physical/remote console); despite providing proper credentials?

ANS:- Here are the possible reasons why an user fails to login into console:

– Account Locked.

When user tries to login via GUI receive an error “authentication failure” after entering password and it goes back to the user list prompt.

In CLI mode, after entering user password, it would fail with an error “incorrect password”. However, if user tries “su” from root account, access would get granted.

– Account Expired.

When account expired, an error notifying about the same would be shown up.

– Shell Disabled

After entering password in GUI, system shows a progress, however, could come back the login prompt. When this user attempts login via CLI, would receive an error “This account is currently not available”. For example, do disable shell of an user “test” : #usermod -s /sbin/nologin test (this only locks only terminal login, however, GUI login would work)

– Only Non-root Users Failed To Login.

If all non-root users are unable to login via GUI/CLI, however, root could login then this could be because of the file “/etc/nologin” presence on the system.

– Only Non-root Users Failed To Login in CLI.

If all non-root users are unable to login via CLI, however, can login via GUI then it would be because of /tmp space limitations. Need to check if /tmp is configured and mounted separately and check free space under /tmp.

– User login failed from GUI or from text console, however, could do su.

If an user fails to login from GUI/Console, however, could login from other user accounts by running ‘su’ then it could be due to pam restrictions. One could use “pam_access” module to restrict login. Need to add :

account required pam _access.so

to files : /etc/pam.d/login & /etc/pam.d/gdm-*

After this add ” – : <UserName> : ALL ” to /etc/security/access.conf file. For example to limit user “test”, we could add below line to access.conf file;

– : test : ALL

{{ there would an error “permission denied” in GUI when user is restricted to login via pam}}

– Only root user login failed from console, however, works in GUI.

This could be because of no terminals available or defined in /etc/securetty file.

If an user failed to login remotely via ssh then the reasons could be different. Here are the reasons:

– User Restricted.

If “AllowUsers” parameter is configured in /etc/ssh/sshd_config then need to add required user to this list to get access.

– Max Logins Set.

If “maxlogins” parameter is set in /etc/security/limits.conf then user would be allowed up to the parameter set and further connections would be denied. There could be “maxsyslogins” configured as well to limit concurrent access to a system.

(14) How to manually add user without using “useradd/adduser” or “system-config-user” utilities?

ANS: Create required directory under /home (default home directory for all local users) and set permissions.

#mkdir /home/user1
#chmod 700 /home/user1

[root@host1 mail]# ls -ld /home/user1
drwx——. 4 user1 user1 4096 Jan 24 07:19 /home/user1

<> Now, edit /etc/passwd file to manually set required parameters for the new user “user1”:

#vipw (this command would block multiple edits of /etc/passwd file)

user1:x:2000:2000:local user:/home/user1:/bin/bash

[root@host1 ~]# grep user1 /etc/passwd

user1:x:2000:2000:local user:/home/user1:/bin/bash

<> Create required group by editing /etc/group file using command ‘vigr’:

#vigr
user1:x:2000:

<> Next step is to create the local profile files for the new user by copying from /etc/skel.

[root@host1 ~]# cp -arv /etc/skel/. /home/user1
`/etc/skel/./.bash_profile’ -> `/home/user1/./.bash_profile’
`/etc/skel/./.bash_logout’ -> `/home/user1/./.bash_logout’
`/etc/skel/./.mozilla’ -> `/home/user1/./.mozilla’
`/etc/skel/./.mozilla/extensions’ -> `/home/user1/./.mozilla/extensions’
`/etc/skel/./.mozilla/plugins’ -> `/home/user1/./.mozilla/plugins’
`/etc/skel/./.gnome2′ -> `/home/user1/./.gnome2′
`/etc/skel/./.bashrc’ -> `/home/user1/./.bashrc’

<> Change permissions of all the files under /home/user1 to be owned by new user:
#chown -R user1:user1 /home/user1

– Try logging in as new user and test.

For user mail requirement, need to create a proper file under /var/spool/mail (default mail box location) with username and permissions:

#cd /var/spool/mail
#touch user1
#chown user1:mail user1

#chmod 660 user1

Linux Administration Interview Questions And Answers

Here you will learn more about advanced Linux administration interview questions and answers to succeed in your next Linux interview.

Linux Shell Scripting Interview Questions And Answers

1) How to create simple shell scripts in Linux?

ANS: Make sure that the file begins with “#!/bin/bash” before any command lines. Make it executable : chmod +x <filename>. Executed by running “sh <filename.sh>” OR <./filename.sh>”.

2) Which command to be used to check the shell being used?

ANS: echo $SHELL
echo $0

Like-wise :

#echo $?
…..this shows the exit status of the most previous process command ran in shell.

#echo $$
….this shows current shell ID (when run inside a script this would print the PID assigned to the shell)

#echo $@ OR #echo $*

….this prints the arguments passed when called for execution.

#echo $#
…..this would show up total number of arguments passed.

#echo $!
…..this would report PID of previous background process.

To check these, run a small script as shown below :
#!/bin/bash
echo -e “Print Current shell ID (\$$): $$”
echo -e “Arguments passed (\$@): $@”
echo -e “No of arguments passed (\$#): $#”
echo -e “This also prints arguments passed (\$*): $*”
………..example:
[root@ansible-host tmp]# ./test.sh 1 2 3
Print Current shell ID ($$): 107199
Arguments passed ($@): 1 2 3
No of arguments passed ($#): 3
This also prints arguments passed ($*): 1 2 3

Linux Log File Interview Questions And Answers

1) Where are the log files stored usually in Linux?

ANS: under /var/log

2) How to check if the syslog service is running?

ANS: /etc/init.d/rsyslog status OR service rsyslog status, otherwise, using “systemctl status rsyslog.service (in RHEL7.x).

3) By default log files are set to get rotated on weekly basis, how to make this gets rotated on monthly basis?

ANS: Edit /etc/logrotate.conf and change below lines

# rotate log files monthly
monthly

Save changes and if you want to rotate the log files immediately then run the command:

#logrotate -f /etc/logrotate.conf

4) How do you check the boot messages (kernel ring buffer)?

ANS:- Using “dmesg” or #cat /var/log/dmesg

5) How to increase size of ‘kernel ring buffer’ file (dmesg)?

ANS:- By default the kernel ring buffer size is 512 bytes. So, to increase this space add “log_buf_len=4M” to the kernel stanza in grub.conf file.

Advanced Linux Administration Interview Questions And Answers

6) What does /var/log/wtmp and /var/log/btmp files indicates and what do they store?

ANS:- These files are used to store user login/logout details since from the date of creation.

The user login, logout, terminal type etc are stored in /var/log/wtmp and this is not a user-readable file, so “last” command reads data from this file (or the file designated by the -f flag).

All un-successful(bad) login attempts are recorded in /var/log/btmp which could be displayed using the command “lastb”. All these login/logout events would also get recorded in /var/log/secure file (this file usually stores all authentication/authorization events).

Like-wise, there is /var/log/lastlog which records most previous successful login event of users. In earlier RHEL versions (RHEL 5.x) there used to be a file /var/log/faillog to hold failed login events which had become obsolete since RHEL6.1 and is no longer available.

Linux Package Interview Questions | Linux YUM Interview Questions

1) What does ‘ivh’ represents in rpm -ivh <PackageName> command?

ANS: i – install
v – verbose mode
h – hash mode where it would print ## characters as the installation progresses

2) What is the difference between rpm -F <PackageName> and rpm -U <PackageName>?

ANS: rpm -F = Basically freshens a package which in turn upgrades an existing package, otherwise doesn’t install it if an earlier version not found.
rpm -U = Upgrades an existing package if exists otherwise install it.

3) How to find to which package the “ls” commands belongs to (to find out package responsible for this command)?

ANS : #rpm -qf /bin/ls {this would tell about the package to which this command (binary file) belongs to if installed by that package}

4) How to find out the configuration files installed by a package (take into consideration of the “coreutils” package)?

ANS : # rpm -qc coreutils

To list out only the document files installed by coreutils package:-
# rpm -qd coreutils

To list out all the files installed by this package:-
#rpm -ql coreutils
OR
#rpm -q – -filesbypkg coreutils

To list out dependencies :-
#rpm -qR coreutils

To list out packages which require this package:-
#rpm -q –whatrequires coreutils

To find out more information of this package:-
#rpm -qi coreutils

To find out any scripts executed by this package:-
#rpm -q –scripts coreutils

Similarly, to find details of package which is not yet installed:

List Files In Package:
#rpm -qpl <PathOfPackageNotYetInstalled>

{The list would show up files which would get added to system after installing package}

List Only Config Files:
#rpm -qpc <PathOfPackageNotYetInstalled>

List Only Document Files:
#rpm -qpd <PathOfPackageNotYetInstalled>

List Out Dependancies For This Package:
#rpm -qpR <PathOfPackageNotYetInstalled>

List Details For This Package:
#rpm -qpi <PathOfPackageNotYetInstalled>

5) How do you find out all the packages installed on a RHEL system(server)?

ANS : – /root/install.log > this would only lists packages installed during deployment of the system. Packages installed later would not be listed here.
– Otherwise, run the command #rpm -qa > this would query rpm database and prints out names respectively.

– In RHEL5.x we can check the file : /var/log/rpmpkgs to find out all packages on the system. However, this file is deprecated in RHEL6.

– Note: In Red Hat Enterprise Linux 6, the daily cron file to create /var/log/rpmpkgs is provided by the rpm-cron package, available in the optional repository, not the main ‘rpm’ package. So, if you do not install the package, /var/log/rpmpkgs is not available on Red Hat Enterprise Linux 6. (Ref – https://access.redhat.com/solutions/23743)

Senior Linux Administrator Interview Questions For Experienced

6) How to create a local yum repository which would make use of the mounted linux ISO image under /media ?

ANS : Create files ending with .repo extension under /etc/yum.repos.d directory with proper syntax:

[root@localhost yum.repos.d]# cat local.repo
[local]
name=RHEL6.5
baseurl=file:///media
enabled=1
gpgcheck=1
gpgkey=file:///media/RPM-GPG-KEY-redhat-release

7) Different ways that can be used to verify that a package got installed successfully via yum:

ANS : ==Method 1==

– Immediately after running yum command, check exit status, if it shows “0” (numeral) then command executed successfully.

[root@localhost yum.repos.d]# echo $?
0

==Method 2==
– Run rpm -qa and test.

[root@localhost yum.repos.d]# rpm -qa | grep certmonger
certmonger-0.61-3.el6.x86_64

==Method 3==
– Verify with rpm command:

[root@localhost yum.repos.d]# rpm -V certmonger

==Method 4==
– Check the yum log to see the successful log entry about the same package.

[root@localhost yum.repos.d]# grep certmonger /var/log/yum.log
Jul 15 10:33:22 Installed: certmonger-0.61-3.el6.x86_64

8)How to view the installed date of a package (consider the package sg3_utils)?

ANS:- Check in /var/log/yum.log file (provided the package is installed by yum):-

[root@server8 ~]# grep sg3_utils /var/log/yum.log
Oct 22 12:11:38 Installed: sg3_utils-1.28-4.el6.x86_64

OR

Use the command “rpm -q <PackageName> –last”

[root@server8 ~]# rpm -q sg3_utils –last
sg3_utils-1.28-4.el6.x86_64 Wed 22 Oct 2014 12:11:37 PM PDT

OR

Using the “rpm -qi <PackageName> | grep “Install Date” command

[root@server8 ~]# rpm -qi sg3_utils|grep “Install Date”
Install Date: Wed 22 Oct 2014 12:11:37 PM PDT Build Host: x86-004.build.bos.redhat.com

In RHEL 5.x, one could use /var/log/rpmpkgs file to check this. To get a list of all the packages installed date: #rpm -qa –last

9) If for some reasons, a binary file gets corrupted or missing from the system, then how could this be recovered with minimal downtime?

ANS:- In first attempt, one could try to copy the missing binary (executable) file from a similar working system using scp command.

In next attempt, if the above attempt not possible or doesn’t work then we could extract this file from respective package and move it to the system.

Consider the situation wherein the binary command file /sbin/ifconfig is missing or corrupted, hence, unable to run this command. So, we’d need to extract this from package and install it.

Steps
———-

– Identify which package this command belongs to.

– On a working system, run the command ‘rpm -qf /sbin/ifconfig’. This would tell which package has installed this executable file:

[root@rh413server sbin]# rpm -qf /sbin/ifconfig
net-tools-1.60-110.el6_2.x86_64

– Mount an iso which holds this package and then run “rpm2cpio” command with “cpio” to extract required file.

– Check if the required file is available in the package before extracting it.

[root@rh413server rpm]# rpm2cpio /media/Packages/net-tools-1.60-110.el6_2.x86_64.rpm |cpio –extract –list –verbose “*ifconfig”
-rwxr-xr-x 1 root root 69440 Apr 26 2012 ./sbin/ifconfig
1542 blocks

– Now, we know that this binary is available with this package, so we’d need to extract this file. Create a directory where to extract.

[root@rh413server package-restore-test]# rpm2cpio /media/Packages/net-tools-1.60-110.el6_2.x86_64.rpm |cpio –extract –make-directories –verbose “*ifconfig”
./sbin/ifconfig
1542 blocks

– The binary would be found under “sbin” directory within current directory.

[root@rh413server package-restore-test]# tree
.
└── sbin
└── ifconfig

1 directory, 1 file

– Later, move this binary file to /sbin folder and make sure proper permissions are set as required.

Linux File System | LVM Interview Questions And Answers

1) How to check what file systems are mounted and their read/write status?

ANS : #cat /etc/mtab
#cat /proc/mounts
#mount
#df -Th > this would not tell the read/write status

2) Where is grub.conf/grub.cfg file stored in RHEL systems?

ANS : In /boot/grub/ OR /etc/grub2 (in case of RHEL7.x) directory.

3) How do you remount a file system read only on the fly?

ANS : #mount -o remount,ro <Mountpoint>
– To make a file system gets mounted read only during boot ,need to edit fstab.

4) Command used to convert ext2 file system into ext3.

ANS : tune2fs -j <device or file system name>

5) How to run file system check on a logical volume in rescue mode?

ANS : – Boot into rescue mode (“linux rescue nomount”)
– Don’t mount any file systems, so “Skip” mounting.
– First make the logical volumes available by running these commands:
– lvm pvscan
– lvm vgscan
– lvm lvscan
– lvm lvchange -ay
– Next, run the file system check on the respective lvm.
– #e2fsck -fy /dev/vgname/lvname

6) How to reduce/extend a root lvm?

ANS : To Reduce – boot into rescue mode without mounting file system (linux rescue nomount).
– activate the lvms if required as explained in previous answer.
– run file system check on respective lvm.
– reduce file system : #resize2fs /dev/vg1/rootlv 5G
– Next, reduce the corresponding lvm : #lvreduce -L 5G /dev/vg1/rootlv (reducing the LV to 5GB)
– Run fsck again.
– Verify the lvm is reflecting the correct size.

To extend – no need to boot into rescue, this could be done online.
– unmount the respective file system first (this is not absolutely necessary, size can be extended online, but always recommended to unmount respective file system)
– Extend the lv : #lvextend -L +1G /dev/vg1/rootlv (extending the size to 1GB plus)
– Extend the file system : #resize2fs /dev/vg1/rootlv
– Run fsck if necessary.

7) How to verify if a filesystem state is marked as clean?

ANS : [root@redhat Desktop]# dumpe2fs -h /dev/sda1 |grep -i state
dumpe2fs 1.41.12 (17-May-2010)
Filesystem state: clean

OR

[root@server8 Desktop]# tune2fs -l /dev/sda1|grep -i state
Filesystem state: clean

8) How to find out backup superblocks for a logical volume?

ANS : [root@redhat Desktop]# dumpe2fs /dev/vg1/rootlv | grep -i “backup superblock”
dumpe2fs 1.41.12 (17-May-2010)
Backup superblock at 32768, Group descriptors at 32769-32769
Backup superblock at 98304, Group descriptors at 98305-98305
Backup superblock at 163840, Group descriptors at 163841-163841
Backup superblock at 229376, Group descriptors at 229377-229377
Backup superblock at 294912, Group descriptors at 294913-294913
Backup superblock at 819200, Group descriptors at 819201-819201
Backup superblock at 884736, Group descriptors at 884737-884737

OR
If the file system is un-mounted then could use mke2fs : #mke2fs -n /dev/vg1/rootlv | grep -i -A1 “superblock backup”

9) Find out list of actual devices associated with a logical volume using lvs command?

ANS : [root@redhat Desktop]# lvs -o +segtype,devices

LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert Type Devices
homelv vg1 -wi-ao—- 1000.00m linear /dev/sda2(0)
rootlv vg1 -wi-ao—- 5.49g linear /dev/sda2(1000)
swaplv vg1 -wi-ao—- 1000.00m linear /dev/sda2(2500)
tmplv vg1 -wi-ao—- 1000.00m linear /dev/sda2(4000)
usrlv vg1 -wi-ao—- 6.37g linear /dev/sda2(2750)
usrlv vg1 -wi-ao—- 6.37g linear /dev/sda2(4250)
varlv vg1 -wi-ao—- 2.93g linear /dev/sda2(250)
testlv vg2 -wi-ao—- 52.00m linear /dev/sdb(0)

OR

– Using vgdisplay : #vgdisplay -v <vgname> {this would list out all the details of the VG including corresponding lvs and pvs within the VG}

— Physical volumes —
PV Name /dev/sdb
PV UUID nFwUZd-F4Cm-tbeq-y75d-OUzX-S2ze-rEeR8x
PV Status allocatable
Total PE / Free PE 25 / 0

PV Name /dev/sdc
PV UUID KWfeHu-cP6u-Qpdz-XzDD-iomY-uSKd-2d6V6G
PV Status allocatable
Total PE / Free PE 25 / 24

OR

– Check the latest lvm archive under /etc/lvm/archive/<archivename>:
[root@redhat Desktop]# grep device /etc/lvm/archive/vg2_00003-697546303.vg
device = “/dev/sdb” # Hint only
device = “/dev/sdc” # Hint only

10) How to set “rw” permissions on file for a user and disable for other users except root user (exclusive permissions)?

ANS : Use “setfacl -m u:<UserName>:<PermissionBits> <File/FolderPath>

#setfacl -m u:redhat:rw /testfile {redhat is an user here}.

To read use “getfacl” command: #getfacl /testfile

Linux Troubleshooting Interview Questions And Answers

11) Different fields in /etc/fstab.

ANS : – DeviceName MountPoint FilesystemType MountOptions DumpFrequency FsckCheckOrder

12) How do you skip the initial fsck(file system check) on a file system while booting up?

ANS : – Edit /etc/fstab and make the last column of the respective file system as 0 (number). This would skip the file system check process.

13) How to list all the files with SUID (Set User ID) bit set under the top level root directory and ignore any errors/warnings in the process, and list the output in long list format?

ANS:- find / -type f -perm -4000 2>/dev/null | xargs ls -l

14) How to list all the files/folders with SUID/SGID/Sticky Bit (Set Group ID) bit set under the top level root directory and ignore any errors/warnings in the process, and list the output in long list format?

ANS:- find / -type f -perm /7000 2>/dev/null | xargs ls -l

15) How to force file system check to run after random/maximum mount counts?

ANS:- One option is to use “tune2fs” (in Ext file systems) command to set this. There are two options “Maximum mount count:” & “Mount count:” which could be used to control after how-many mounts the file system check should be run. By default the “Maximum mount count:” option would be set “-1” when file system gets created which mask this feature. So, to get a file system check (fsck) on system reboot/reset this has to be set and which in turn depends on “Mount count”. These mount counts would get incremented after each system reset/restart.

Default option:

[root@rh413server yum.repos.d]# tune2fs -l /dev/sda2 |grep -i “mount count”
Mount count: 9
Maximum mount count: -1

So, to force ‘fsck’ on count reach of 10, we can tune-up the file system as shown below:

[root@rh413server yum.repos.d]# tune2fs -c 10 /dev/sda2
tune2fs 1.41.12 (17-May-2010)
Setting maximal mount count to 10
[root@rh413server yum.repos.d]# tune2fs -l /dev/sda2 |grep -i “mount count”
Mount count: 9
Maximum mount count: 10

Now, after the 10th mount of the file system, it would force a file system check and mount counter would be reset to 1.

Otherwise, there is another global option which could be used to make file system check after 180 days or after random number of mounts using “enable_periodic_fsck” in /etc/mk2fs.conf file as shown below:

[root@rh413server yum.repos.d]# grep -i enable_periodic_fsck /etc/mke2fs.conf
enable_periodic_fsck = 1

NOTE: To get this the e2fsprogs package should be at least “e2fsprogs-1.41.12-20.el6”. Hence, need to update older package. This has been added from RHEL 6.6 on-wards.

Ref: https://access.redhat.com/solutions/428583

16) How to search for all files with extension “*.log” in the current working directory and find out total disk space consumed and skip such files under any sub-directories?

ANS : – There are situations wherein an admin would required to find out total disk space consumed by those files such as “*.log” or “*.dat” etc., so one could use this command:

[root@ftp-server data]# find . -maxdepth 1 -name ‘*.log’ | xargs ls -l | awk ‘{ TOTAL += $5} END { print TOTAL }’
3045458

[root@ftp-server data]# find . -maxdepth 1 -name ‘*.log’ -type f -exec du -bc {} + | grep total | cut -f1
3045458

If there are smaller files then running the ‘find’ command or ‘du’ command would work, however, if there are bigger files then one may come across error “argument is too long”, so need to use “xargs” to parse output to avoid such errors. Ref : https://access.redhat.com/solutions/21118

$ find . -maxdepth 1 -name ‘*.dat’ | xargs ls -l | awk ‘{ TOTAL += $5} END { print TOTAL }’
20134408530

16) What are the differences between hard & soft links in Linux file system?

ANS : –
Hard Links Soft Links

Gets created using same I-node number with a different name.

Gets created using alias name referring the original file name, but uses different I-node.

Can only be created within same file system.

Can be created across file systems.

Remains even if original file is removed.

Dies after original file is removed, otherwise exists as a dead link.

Can’t be created for directories.

Can be used to create links to directories.

Linux Boot Kernel Interview Questions And Answers

1) I’ve installed the latest kernel on the system successfully, however, my server still boots from the old kernel. How do you make the system to boot from the newly installed kernel?

ANS : – Verify if the new kernel packages are installed successfully.
– Verify if the kernel stanza is added in grub.conf file.
– Make the new kernel as the default kernel to boot in grub.conf file. Either move the kernel stanza to be the first or change “default” entry according to the kernel stanza to boot.

2) There is an error during the boot stating “cannot resolve label for a file system” and system is dropping into single user mode. System would show up Ctrl+D error. How could this be fixed?

ANS : – Make a note of the file system for which the label failed to resolve.
– Boot into single user mode.
– remount root file system in rw mode = #mount -o remount,rw /
– use “blkid” or “e2label” or “findfs” or “lsblk -f” OR “check in /dev/disk/by-uuid/ or /dev/disk/by-label/” to find out the labels/UUIDs assigned to each mounted devices. If the label is not correct in fstab then edit it.
– Exit and reboot. this would fix the label error.

3) Which command is to be used to create GRUB password to avoid normal user in editing GRUB interface while booting?

ANS :- Using the command “grub-crypt” (in RHEL 6.x). This generates an encrypted password using “sha512” algorithm. You could also use “grub-md5-crypt” which generates “md5” encrypted password.

– paste the generated encrypted password into grub.conf file wherever needed as shown below (only a part of grub.conf file is pasted below):

default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
password –encrypted $1$EgrNz1$MbdclVToRCCsOF7OuBEgb/
title Red Hat Enterprise Linux (2.6.32-431.el6.x86_64)

So, with the grub password added anyone who wants to pass arguments to kernel while booting has to enter the password by pressing “P” and then proceed. RHEL 5.x, uses “grub-md5-crypt” command by default to generate one and could use “password –md5 <password-hash>” format in grub.conf file.

4) How do you disable the “NetworkManager” service on runlevel 5?

ANS :- [root@redhat Desktop]# chkconfig –level 5 NetworkManager off

[root@redhat Desktop]# chkconfig –list NetworkManager
NetworkManager 0:off 1:off 2:on 3:on 4:on 5:off 6:off

NOTE: In RHEL7.x, NetworkManager is the standard and default daemon for managing network.

5) Which is the parameter that you would add to grub.conf while configuring kdump?

ANS :- crashkernel=128M (for 128MB crash memory) {crashkernel=0M-2G:128M,2G-6G:256M,6G-8G:512M,8G-:768M}

Linux Technical Interview Questions And Answers For Experienced

6) How can I reboot quickly into another kernel (if available) by-passing BIOS process?

ANS :- This is possible provided kexec-tools package is installed. Say for example there are two kernel images installed:
(kernel-2.6.32-642.4.2.el6.x86_64 & kernel-2.6.32-642.el6.x86_64), and running kernel is “2.6.32-642.4.2.el6.x86_64″, and to boot quickly boot into older kernel by-passing BIOS process, need to run the below commands:

#kexec -l /boot/vmlinuz-2.6.32-642.el6.x86_64 –initrd=/boot/initramfs-2.6.32-642.el6.x86_64.img –command-line=”$(cat /proc/cmdline)”

So, what the above command does is:

> kexec -l /boot/vmlinuz-2.6.32-642.el6.x86_64 <<< this specifies the which kernel image to load

> –initrd=/boot/initramfs-2.6.32-642.el6.x86_64.img <<< which initird image to load

> –command-line=”$(cat /proc/cmdline)” <<<< shows command-line parameters

Once the above command is executed successfully, run the command “kexec -e” to reboot quickly into older kernel.

Linux System Hardware Interview Questions And Answers

1) Commands:

– To check memory availability #free -m Or #cat /proc/meminfo OR top or #vmstat
– To check CPU details #cat /proc/cpuinfo Or lscpu (RHEL6) or check in dmesg
– To check the loaded modules #lsmod
– To load a module #modprobe
– To check all (active/inactive) network interfaces #ifconfig -a Or ip a Or #cat /proc/net/dev
– To scan bus so that all newly added devices/luns would come up: #rescan-scsi-bus.sh or #echo “- – -” > /sys/class/scsi_host/host<ID>/scan {to get the rescan-scsi-bus.sh command, need to install sg3_utils package}
– To check most recent system reboot :#last reboot | head -1 {last command reads from /var/log/wtmp, lastb reads from /var/log/btmp}

[root@redhat Desktop]# last reboot|head -1
reboot system boot 2.6.32-431.el6.x Thu Jul 17 15:43 – 17:09 (01:25)

– To check the most recent system shutdown time :#last -x|grep shutdown|head -1

[root@redhat Desktop]# last -x | grep shutdown|head -1
shutdown system down 2.6.32-431.el6.x Thu Jul 17 15:43 – 15:43 (00:00)

– To check processor statistics : #mpstat or #iostat {these commands belongs to sysstat package}

2) Common Standard Ports Used :

ANS: =
= 21/20 ftp
= 22 ssh
= 23 telnet
= 25 smtp
= 53 DNS (tcp/udp)
= 68 DHCP
= 69 TFTP
= 80/443 http/https (tcp)
= 88/464 Kerberos (tcp/udp)
= 110 pop3
= 123 NTP(udp)
= 137 nmbd
= 138,139,445 smbd
= 143 IMAP
= 161 SNMP
= 389/636 LDAP/LDAPS (tcp)
= 514 (udp) syslogd
= 2049 NFS

3) How to find out the system hardware details such as “manufacture, product name” etc,.?

ANS: Using “dmidecode”

#dmidecode –type system |egrep -i “Manufacturer|Product Name|Serial Number|Family”
OR
#dmidecode –type system |grep “System Information” -A 8

– To find out BIOS details :
#dmidecode –type bios |grep “BIOS Information” -A 6

Please visit my recent blog post for more details and easier way to get the information:

View System Hardware Info

4) The option “Open in Terminal” is missing when user right clicks on terminal in GUI. How to fix this?

ANS : This is basically because of missing package “nautilus-open-terminal”. Once this is installed, the right click option would show up.

5) How to change the default display manager or desktop from Gnome Display Manager (gdm) to kde?

ANS: You would need to install the KDE related packages first. Run command “yum groupinstall “KDE Desktop” to get all the KDE related packages to be installed (provided yum is configured). Once this is done, create the file “/etc/sysconfig/desktop” and add the below lines:

DISPLAYMANAGER=”KDE”
DESKTOP=”KDE”

After this change, restart the X window session.

In RHEL 5.x, you could use “switchdesk” command to switch to different display managers. So, to switch to KDE, you could use the command “switchdesk kde”. This may prompt to install “KDE Software Development” group if not installed.

Advanced Linux Administration Interview Questions And Answers

6) How to run ‘free’ command to print output of 2 instances with 2 seconds interval and store that output in a file (skipping any errors/warnings), and run this in background?

ANS:

[root@localhost ~]# free -s 2 -c 2 1> /tmp/free.out 2> /dev/null &
[1] 4836
[root@localhost ~]# cat /tmp/free.out
total used free shared buffers cached
Mem: 461456 349112 112344 0 12768 47780
-/+ buffers/cache: 288564 172892
Swap: 2031608 26712 2004896

total used free shared buffers cached
Mem: 461456 349120 112336 0 12768 47780
-/+ buffers/cache: 288572 172884
Swap: 2031608 26712 2004896

[1]+ Done free -s 2 -c 2 > /tmp/free.out 2> /dev/null

7) How to find out when was the last time a service got restarted?

ANS:- One way is to check in respective configured logs, otherwise, we could find the process start time using “ps” command.

For example, if you wish to find out the restart occurrence of “sshd” then check in /var/log/secure, you would see something similar to below lines:

Jun 18 05:29:18 nagios sshd[5413]: Received signal 15; terminating.
Jun 18 05:29:18 nagios sshd[5612]: Server listening on 0.0.0.0 port 22.
Jun 18 05:29:18 nagios sshd[5612]: Server listening on :: port 22.

Using ps command:

[root@nagios Desktop]# ps -p $(ps -C sshd -o pid=) -o lstart
STARTED
Thu Jun 18 05:29:18 2015

OR

[root@nagios Desktop]# ps -p $(pgrep sshd) -o lstart
STARTED
Thu Jun 18 05:29:18 2015

Replace the service name with respective service you wish to check far. To find out the most recent ‘httpd’ service restart time :

[root@nagios Desktop]# ps -p $(ps -C httpd -o pid=|head -1) -o lstart
STARTED
Thu Jun 18 05:34:35 2015

Otherwise, check in httpd log files, you would similar lines like below:

[Thu Jun 18 05:34:35 2015] [notice] caught SIGTERM, shutting down
[Thu Jun 18 05:34:36 2015] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 configured — resuming normal operations

8) What is an elevator (disk elevator) or IO scheduler?

ANS:- It is an algorithm that is used by storage sub-system which takes care of how data gets re-arranged when called in for read/write and merges the requests in a way which would be efficient to the system.

To find out the elevator being used on a disk : # cat /sys/block/<DEVICE>/queue/scheduler

[root@ansible-host ~]# cat /sys/block/sda/queue/scheduler
noop anticipatory deadline [cfq]

To change an elevator on the fly:

[root@ansible-host ~]# echo deadline > /sys/block/sda/queue/scheduler
[root@ansible-host ~]# cat /sys/block/sda/queue/scheduler
noop anticipatory [deadline] cfq

To make changes permanent, add the elevator parameter (elevator=deadline) to grub configuration file into default kernel line.

Different elevator methods being used:

–“– Noop –“—

As the name implies this does nothing of data re-order or queuing, it just manages data as First-In-First-Out basis and would ideal when there is a separate storage based controller which does better data re-ordering and understanding of disk layout so that the kernel workload would gets reduced. This would be an ideal option when SSD drives are used.

–“– Anticipatory –“–

In this disk elevator algorithm, each read/write requests would wait a short time before after a request to see if another read/write request for nearby sector is coming up. So, each such requests would have “antic_expire” parameter set measured in milliseconds. If so it will wait for another antic_expire for another. However, each requests whether read/write would also have “read/write expire” parameter set which would serve the requests after the timeout count goes 0 (zero). This is ideal in case of contiguous reads such as FTP servers but not good for database servers.

–“– Deadline –“–

Just like how anticipatory elevator works, the deadline also maintains read/write expiry time outs, however, doesn’t wait for a nearby request before moving requests into queue. Requests in queue would get served in batches based on FIFO. This best suited for servers which does heavy read/write operations such as database servers.

–“– CFQ (Completely Fair Queuing) –“–

This is designed for systems which does a lot of small disk read/writes and multiple processes would be generating disk IOs. This is default elevator being used in RHEL 6. This would normally be used in Desktop system or Usenet servers.

“deadline” is now the default IO scheduler in RHEL 7.x (except SATA drives) which was earlier “cfq” by default.

Linux Networking Interview Questions And Answers

1) How do you change the network speed of an interface to 100Mbps with auto-negotiation off and duplex in full mode(example for interface eth0)?

ANS : – #ethtool -s eth0 speed 100 autoneg off duplex full {changing the speed on the fly}
– To make this changes persistent need to add the below line to /etc/sysconfig/network-scripts/ifcfg-eth0 file:
ETHTOOL_OPTS=”speed 100 autoneg off duplex full”

2) Every time the system reboots the network interface doesn’t come up. However, if you restart network service or execute “ifup eth0” command which would bring up the network fine? How could this be fixed?

ANS : Make sure that “ONBOOT=Yes” is set in the respective configuration file (example in ifcfg-eth0 for eth0). In this case the “ONBOOT” parameter would be set to “NO”.

– If the above step doesn’t help then check /etc/sysconfig/network file and make sure “NETWORKING” is set to “Yes”. {These are the most likely reasons in this case}

3) How do you check the network routing table using commands?

ANS : – #route -n
OR
#netstat -nr

4) After changing the network card on a system the network interface name got changed from eth0 to eth1. This shows when you run the command “ifconfig -a”. Running “service network restart”, shows this error “Device eth0 doesn’t seem to be present”. But when you run the command “ifconfig -a” you would notice eth1 is listed there instead of eth0. So, running “ifup eth1” shows error as “configuration for eth1 not found”. How to make sure that the network interface becomes eth0 here and up along with the server?

ANS : – Make a note of the HW/MAC address of the second network interface here. {ifconfig eth1}
– Enter this MAC into the field “HWADDR” in ifcfg-eth0 file.
– Now, edit “/etc/udev/rules.d/70-persistent-net.rules file.
– You comment out the line of eth0 here and change the name of eth1 to eth0. Save and exit.
– Reboot the system. {this should fix the issue, tested on RHEL6.5 system}.

* This file has been deprecated in RHEL7.x [https://access.redhat.com/solutions/1554703]

—OR—

If the environment doesn’t permit of restart of the system then one could use “udevadm trigger” command to get the changes done without restart.

– First make sure the respective interface config file is present, if not then need to create one manually. In the question here, the interface name was changed from eth0 to eth1, hence, need to look out for ifcfg-eth0 interface file under “/etc/sysconfig/network-scripts” directory and change “HWADDR” and other fields as necessary (these options such as “Hwaddr”, “UUID” are not mandatory, if you wish then you could drop them or remove them if not required).

– Stop the network service. (#service network stop, assuming NetworkManager is not being used).

– Now, navigate to “/etc/udev/rules.d/” directory and edit “70-persistent-net.rules” file. Make sure the hardware address recorded here is correct and change the “NAME” attribute value to match your needs, save it and exit from vi mode.

– Trigger the udevadm to re-read network device rules.

#udevadm control –reload-rules
#udevadm trigger –verbose –subsystem-match=net

– Now, check out the currently available network interfaces (#ip addr show). This should show up modified one as “eth0” instead of “eth1”.

– Start the network service (#service network start).

– If for some reason the interface name don’t change, then unload network module and re-load it (this would drop off current connection, please be aware). If there is no direct access to systems then run a simple “at” command with required time stamp to load network modules, after which connections would work.

Linux Technical Interview Questions And Answers

5) How to fix/troubleshoot “no network” or “network down” or “unable to ping remote host” or “localhost doesn’t ping” problems?

ANS :- When network is down or unable to ping remote (another) host system, we’d need to start checking the following things sequentially:

<> Check if local network interface is working properly.

– Ping localhost to confirm that local network interface is up and required network modules are loaded. If unable to ping localhost check for following things:

<> Check if “lo” (loop-back) interface is up (ifconfig lo)

– You should see “UP LOOPBACK RUNNING” line in the output. If not then bring up the loopback interface : #ifup lo

<>Check if 127.0.0.1 address is mapped with localhost in /etc/hosts file. If there is no such entry then pinging 0 (numeral) would work, however, pining localhost would fail. So, add the entry as:

= 127.0.0.1 localhost

<> Check if at least one network interface is up on system.

#ifconfig eth0 (it could be any interface)

– This should show up a valid IP address and also would indicate if network is active (UP). If network is down then bring it up:

#ifup eth0

– If unable to get a valid IP address here, then need to check how is IP address being provisioned, it could be static or dynamic. If static then check in
/etc/sysconfig/network-scripts/ifcfg-eth0 (i’ve taken eth0 as an example here) and look for valid entries as shown below:

DEVICE=”eth0″
BOOTPROTO=”static”
HWADDR=”00:0C:29:98:64:4C”
ONBOOT=”yes”
TYPE=”Ethernet”
UUID=”99b3f47f-5a68-4ffd-992a-aaa24ad12139″
IPADDR=”192.168.1.211″
NETMASK=”255.255.255.0″

– Bring up the interface if it is down :#ifup eth0
– Still unable to bring up network interface then restart the network service :
#service network restart
OR
#service NetworkManager restart

– If it is dynamic mode of IP address then check if there is any problem on the DHCP server. Try to set a test (static) IP address and check if that works.

<> Next step is to ping the hostname to confirm that name resolution works good.

#ping `hostname` OR ping <IPAddressOfeth0>

– If the above ping fails then ping the ipaddress directly and test if that works then problem with name resolution (DNS), so it should be either addressed at DNS level or fixing /etc/hosts file.

<> Ping another host/node OR Gateway address.

– Now, ping another host/node on the same network group. If ping success then we’d say routing is working, otherwise, check if gateway is configured properly. Ping the gateway address and check.

– Unable to ping another remote host then problem could be at the router end or routing problem. So, run traceroute at this stage and check where network is dropping connections.

<> Unable to ping anything either localhost or remote host or loopback address.

– This could be a problem either with firewall (iptables rules are set), otherwise, with sysctl settings configured on the system. Check if
“net.ipv4.icmp_echo_ignore_all” has been set in /etc/sysctl.con file, if so, please un-set this.

– If firewall problem, then make sure “icmp” protocol and “lo” interface is allowed for communication.

= iptables -A INPUT -i lo -j ACCEPT {A – Append OR I -Insert}

iptables -A INPUT -p icmp -j ACCEPT

6) What are the alternative steps that could be used to test a remote server alive status when ping check fails (if blocked by iptables)?

ANS :

–> Ping failure doesn’t necessarily mean that remote host is down. In such cases it could be possible that ICMP replies would have been disabled (via sysctl) or blocked by firewall rules via iptables.

–> In this case, one could try to check if connectivity works via ssh. Try running ssh in verbose mode (ssh -v username@RemoteHostAddress). If this fails then this would indicate either ssh service is down or user-restricted or blocked by firewall on remote host.

–> At this stage we are still un-sure if remote host is up when both ping & SSH fails to get an acknowledgement. At this juncture, one may use an un-secure telnet (might require to install telnet package) to test if remote host is listening on a port. This would also not respond if port is blocked by firewall.

#telnet <RemoteHostIP> <PortNumber>

–> Next step when telnet also doesn’t show up successful connection is to use nmap (belongs to nmap package)command which would scan the remote host and provides details about host live status along with ports which are filter/un-filtered.

#nmap -sn <RemoteHostIP>

–> This command would performs only host discovery without port scanning. This would fetch quick discovery of hosts alive status. Use “nmap -sn <RemoteHostIP> -n” to ignore name resolution. If the nmap command returns “0 hosts up” or “Host seems to be down” then it would indicate a problem with remote system or network.

–> Optionally, there is “tcping” package available from EPEL which can be used to test remote host alive status using port ping.

#tcping <RemoteHostAddress> <PortNumber>

–> Also there is “netcat” utility (need to install this package) available which is another handy network tool which does a lot of functions including port scanning, so this could be used to test if a port on a remote host is allowed or blocked via firewall.

#nc -z <RemoteHostAddress> <PortNumber>

[root@server1 Desktop]# nc -z 192.168.1.100 22
Connection to 192.168.1.100 22 port [tcp/ssh] succeeded!

Linux Security Interview Questions And Answers

1) How do you backup and restore iptables (configurations)?

ANS : #iptables-save > /tmp/iptables.out
#iptables-restore < /tmp/iptables.out

2) What does the character “S” or “s” in the execute bit location of user permission indicates?

ANS : # “S” indicates that the SUID has been set, however, execute permission is not set. “s” indicates SUID has been set with execute permission.

3) How do you provide an user exclusive permissions to shutdown or reboot a system?

ANS : # Make the user sudo with appropriate permissions on the commands required.
– Edit the file /etc/sudoers using the command “visudo”.
– Add the below lines to /etc/sudoers file: (example to make user “raj” to execute shutdown/reboot commands)

{format
<username> <host>=<commands> }

raj ALL=/sbin/shutdown,/sbin/reboot,/sbin/poweroff

– The next user logins and executes the command “sudo /sbin/shutdown” the user would be prompted to enter password and upon successful authentication the command gets executed.

4) How to disable password-less login for root user in single user mode?

ANS:- Change the line that reads “SINGLE=/sbin/sushell” to “SINGLE=/sbin/sulogin” in “/etc/sysconfig/init” file.

This prompts for user (root) to enter a valid password to authenticate. However, if “init=/bin/sh” is passed as grub parameter then system would boot without prompting for password.

5) How to temporarily disable all user log-in except root user (either via SSH or terminal or in GUI)?

ANS:- This could be achieved by creating /etc/nologin file (as root user). If this file exists then any user who tries to log-in would gets rejected and only root user would be allowed (the root user may not be allowed to login via ssh if “PermitRootLogin” is set to “no” in /etc/ssh/sshd_config).

Linux Admin Interview Questions And Answers For Experienced

6) How to disable “Restart” & “Shut Down” buttons on the GUI Login screen?

ANS: In RHEL 6.x, you would need to use gconftool-2 or gconf-editor commands for this purpose.

Using gconftool-2 command:

To disable “Restart” & “Shut Down” buttons on the GUI log-in screen, run the below command as root user:

#gconftool-2 –direct –config-source xml:readwrite:/etc/gconf/gconf.xml.defaults –type bool –set /apps/gdm/simple-greeter/disable_restart_buttons true

These are defined as schemas in “/etc/gconf/schemas/gdm-simple-greeter.schemas” file.

Same way, if you wish to disable user list, run the below command as root user:

#gconftool-2 –direct –config-source xml:readwrite:/etc/gconf/gconf.xml.defautls –type bool –set /apps/gdm/simple-greeter/disable_user_list true

Using gconf-editor command:

Run “gconf-editor” command, expand “apps” and then “gdm”, click on “simple-greeter” and then check “disable_restart_buttons”, then right click on “disable_restart_buttons” and choose “Set as Default”.

In RHEL 5.x

The simplest way to achieve this in RHEL 5.x is to run the command “gdmsetup” in GUI as root user, un-check “Show Actions Menu” under “Menu Bar” in “local” tab. This would remove “Restart” & “Shut Down” buttons on the GUI log-in screen.

In RHEL 7.x

Edit (as root user) “/etc/dconf/db/gdm.d/01-custom-gdm-settings” file and the following lines:

[org/gnome/login-screen]
disable-user-list=true

Then update “dconf” database using the command “dconf update”, finally restart gdm service “systemctl restart gdm”

7) What does the umask value of 0022 indicates for a root user?

ANS:Before understanding this, one must understand the numerical values being used to represent permission bits in Unix environment. It is as shown below:

r – “read” permission – numerical equivalent value “4”
w – “write” permission – numerical equivalent value “2”
x – “execute” permission – numerical equivalent value “1”
s – “special” permission bit – numerical equivalent “4” for SUID (SetUserID), “2” for SGID(SetGroupID “1” for Sticky-bit.

u – “user”
g – “group”
o – “others”

Set/Unset Permissions: Using chmod command. Say for example you wish to set only “read & write (rw)” permission for owner, no permissions for group and others then this could be done like below:

$chmod 600 <filename> OR $chmod u+rw,go-rwx <filename>

Now, lets check what does 0022 umask value indicates:

0 – Indicates special character bit, not masked.
0 – Indicates mask nothing, all permission bits are set for “Owner”.
2 – Indicates mask 2 for “Group” (for files it is “x4x” meaning both read & write bits are set likewise for directories it is “x5x” meaning both read & execute bits are set)
2 – Indicates mask 2 for others ( as explained above)

Saying so, when a root user creates a file/directory this umask bit would be used to set the effective permissions. For a file it would be (666-022=644), rw-,r–,r– (read&write,read,read) respectively for user, group and others (ugo). However, when a directory is created it would be (777-022=755) rwx,r-x,r-x for ugo. Same way the default umask value for other users is 0002.

Original Source: SimplyLinuxFAQ

OTHER INTERVIEW QUESTIONS

  1. SQL Interview Questions
  2. RPA Interview Questions And Answers
  3. Android Interview Questions
  4. Mulesoft Interview Questions
  5. JSON Interview Questions
  6. PeopleSoft HRMS Interview Questions
  7. PeopleSoft Functional Interview Questions
  8. PeopleTools Interview Questions
  9. Peoplesoft Technical Interview Questions
  10. 199 Peoplesoft Interview Questions
  11. 200 Blue Prism Interview Questions
  12. Visualforce Interview Questions
  13. Salesforce Interview Questions
  14. 300 SSIS Interview Questions
  15. PHP Interview Questions And Answers
  16. Alteryx Interview Questions
  17. AWS Cloud Support Interview Questions
  18. Google Kubernetes Engine Interview Questions
  19. AWS Devops Interview Questions
  20. Apigee Interview Questions
  21. Actimize Interview Questions
  22. Kibana Interview Questions
  23. Nagios Interview Questions
  24. Jenkins Interview Questions
  25. Chef Interview Questions
  26. Puppet Interview Questions
  27. DB2 Interview Questions
  28. AnthillPro Interview Questions
  29. Angular 2 Interview Questions
  30. Hibernate Interview Questions
  31. Kubernetes Interview Questions