Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Tuesday, July 10

What is a sticky Bit and how to set it in Linux

Sticky bits are mainly set on directories.
If you give 777 (full permission) to any directory then all users can delete,modify all files and directories so to avoid this we use sticky bit. by using it, all users can create and modify their own directories or files not others 
If the sticky bit is set for a directory, only the owner of that directory or the owner of a file can delete or rename a file within that directory.

The following two commands are used  to apply sticky bit on any directory  

chmod +t directory_name 
OR 
chmod 1777 directory_name

Sunday, July 8

Some Linux Interview Questions and Answers--4


There are seven fields in the /etc/passwd file. Which of the following lists all the fields in the correct order? 
Choose one:
a. username, UID, GID, home directory, command, comment
b. username, UID, GID, comment, home directory, command
c. UID, username, GID, home directory, comment, command
d. username, UID, group name, GID, home directory, comment
Answer: b
The seven fields required for each line in the /etc/passwd file are username, UID, GID, comment, home directory, command. Each of these fields must be separated by a colon even if they are empty.
Which of the following commands will show a list of the files in your home directory including hidden files and the contents of all subdirectories?
Choose one:
a. ls -c home
b. ls -aR /home/username
c. ls -aF /home/username
d. ls -l /home/username


Answer: b
The ls command is used to display a listing of files. The -a option will cause hidden files to be displayed as well. The -R option causes ls to recurse down the directory tree. All of this starts at your home directory.
In order to prevent a user from logging in, you can add a(n) ________at the beginning of the password field. 
Answer: asterick

Some Linux Interview Questions and Answers--3


What key combination can you press to suspend a running job and place it in the background?
ctrl-z

Using ctrl-z will suspend a job and put it in the background.
The easiest, most basic form of backing up a file is to _____ it to another location. 
copy

The easiest most basic form of backing up a file is to make a copy of that file to another location such as a floppy disk.
What type of server is used to remotely assign IP addresses to machines during the installation process? 
A) SMB
B) NFS
C) DHCP
D) FT
E) HTTP


Some Linux Interview Questions & Answers---2


In order to run fsck on the root partition, the root partition must be mounted as readonly

You cannot run fsck on a partition that is mounted as read-write.
In order to improve your system's security you decide to implement shadow passwords. What command should you use? 
pwconv

The pwconv command creates the file /etc/shadow and changes all passwords to 'x' in the /etc/passwd file.
Bob Armstrong, who has a username of boba, calls to tell you he forgot his password. What command should you use to reset his command? 
passwd boba

Some Linux Interview Questions and Answers----1


You need to see the last fifteen lines of the files dog, cat and horse. What command should you use?

tail -15 dog cat horse

The tail utility displays the end of a file. The -15 tells tail to display the last fifteen lines of each specified file.
Who owns the data dictionary? 
The SYS user owns the data dictionary. The SYS and SYSTEM users are created when the database is created.
You routinely compress old log files. You now need to examine a log from two months ago. In order to view its contents without first having to decompress it, use the _________ utility. 
zcat

Saturday, July 7

How To Troubleshoot boot partition in Linux




How To Troubleshoot when /boot partition value has changed
or
To Troubleshoot Error 15/17

Case I:--

1.    Restart System and intrupt booting by pressing any key
2.    Press E on redhat linux title to edit
3.    Again Press E to edit parttion value
4.    After Editing Press B to boot machine

How To Break Root Password in Linux



How To Break Root Password

Case I:--

If Bootloader don't have password or we know bootloader password
Key Points:--
1.    Select Redhat linux title and press E to edit
2.    Press E to edit kernel line
3.    then type 1 after giving single space
4.    Below Editing
5.    kernel /vmlinuz-2.6.32-71.el6.x86_64 ro ....................crashkernel=auto rhgb quiet
6.    After Editing
7.    kernel /vmlinuz-2.6.32-71.el6.x86_64 ro......................crashkernel=auto rhgb quiet 1
8.    Then Enter and boot by B

How to install linux in CLI Mode


How to install linux in CLI Mode

1.    Boot System with Linux DVD
2.    Press Esc
3.    Type/Enter:---> #linux text
4.    Enter
5.    Choose disk test
6.    follow instructions

Benefits of RHCE


Benefits to earning a Red Hat certification
  • Recognition in the industry
  • Increased customer confidence
  • Proof of knowledge and skills
  • Certification verification tool for employers
  • Use of the certification logo on business cards
  • Ability to access multiple Red Hat Certificated Professional online communities (like Facebook and LinkedIn)

Red Hat Certified Engineer — RHCE



An RHCE® certification is earned by a Red Hat® Certified System Administrator (RHCSA) who has demonstrated the knowledge, skill, and ability required of a senior system administrator responsible for Red Hat Enterprise Linux® systems. Professionals holding this certification have continually helped their companies with successful deployments and migrations.
Prerequisites

Linux and GNU



Linux and GNU

Although there are a large number of Linux implementations, you will find a lot of similarities in the different
distributions, if only because every Linux machine is a box with building blocks that you may put together
following your own needs and views. Installing the system is only the beginning of a longterm relationship.
Just when you think you have a nice running system, Linux will stimulate your imagination and creativeness,
and the more you realize what power the system can give you, the more you will try to redefine its limits.
Linux may appear different depending on the distribution, your hardware and personal taste, but the
fundamentals on which all graphical and other interfaces are built, remain the same. The Linux system is
based on GNU tools (Gnu's Not UNIX), which provide a set of standard ways to handle and use the system.

Properties of Linux



Linux Pros

A lot of the advantages of Linux are a consequence of Linux' origins, deeply rooted in UNIX, except for the
first advantage, of course:
Linux is free:
As in free beer, they say. If you want to spend absolutely nothing, you don't even have to pay the
price of a CD. Linux can be downloaded in its entirety from the Internet completely for free. No
registration fees, no costs per user, free updates, and freely available source code in case you want to
change the behavior of your system.