rhel interview questions
Top rhel frequently asked interview questions
I'm using Red Hat 5.4.
I have installed a package using yum the package was wireshark.
However, after it has installed. Where can I find the rpm package?
I would like to locate the actual wireshark.rpm package so that I can install it on another machine that is not connected to the Internet.
Source: (StackOverflow)
When I try to run man page on my Red Hat as a normal user I get "No manual entry for zip"
If I change to root run: "man zip" and then I get the man page and afterwards I see the same man page as I did with root. Is there some kind of man page generation process taking place when I run it for the first time with root?
I have checked the /usr/share/man/man1/ there seem to be all the man pages for tools I usually use cp, ls, zip etc. I have also set $MANPATH envvar, but still no help.
Am I doing something wrong or the configuration on Red Hats differs from that of other Linux distros?
Source: (StackOverflow)
I was given a VM for a RHEL5.5 machine but I do not have a RHN subscription. I get this warning when using yum:
bash-3.2$ sudo yum update
[sudo] password for streamsadmin:
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Skipping security plugin, no data
Setting up Update Process
No Packages marked for Update
Can I switch to using CentOS repositories instead?
Source: (StackOverflow)
I was setting up a RHEL7 server in vmware vSphere and I'm having trouble getting it on the network without NetworkManager. I configured the server to have a static IP during the install process and it set everything up using NetworkManager. While this does work we do not use NetworkManager in my office, so I went and entered what we usually put the config file to get RHEL6 servers online without NetworkManager.
/etc/sysconfig/network-scripts/ifcfg-ens192 is the following:
NAME=ens192
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=10.0.2.15
PREFIX=24
GATEWAY=10.0.2.2
However when I disable NetworkManager the network service fails to start with the following error
#service network restart
Restarting network (via systemctl): Job for network.service failed.
See 'systemctl status network.service' and 'journalctl -xn' for
details.
And both commands output the following:
network[1838]: RTNETLINK answers: File exists
network[1838]:
RTNETLINK answers: File exists
network[1838]: RTNETLINK answers:
File exists
network[1838]: RTNETLINK answers: File exists
network[1838]: RTNETLINK answers: File exists
network[1838]:
RTNETLINK answers: File exists
network[1838]: RTNETLINK answers:
File exists
systemd[1]: network.service: control process exited,
code=exited status=1
systemd[1]: Failed to start LSB: Bring up/down
networking
Also, here's what the command 'ip addr' outputs:
1: lo: mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd
00:00:00:00:00:00
inet 127.0.0.1/8 scope
host lo
valid_lft
forever preferred_lft forever
inet6
::1/128 scope host
valid_lft forever
preferred_lft forever
2: ens192: mtu 1500
qdisc noop state DOWN qlen 1000
link/ether 08:00:27:98:8e:df brd
ff:ff:ff:ff:ff:ff
Source: (StackOverflow)
I have virtual box with RHEL installed. My virtual box is running on windows 7 64 -bit. I configured bridged connection, but when I am restarting network interfaces, I receive following error:
Determining IP information for eth1... failed
On Windows XP it works without problems. I disabled Windows Firewall and installed latest Virtual Box, still without success.
NAT is working without any problems. What did I missed?
UPDATE
Ouput of ifconfig -a
is:
eth0 Link encap:Ethernet HWaddr 08:00:27:B6:FC:69
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:feb6:fc69/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:430 errors:0 dropped:0 overruns:0 frame:0
TX packets:346 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:36520 (35.6 KiB) TX bytes:31455 (30.7 KiB)
eth1 Link encap:Ethernet HWaddr 08:00:27:C3:84:4A
inet6 addr: fe80::a00:27ff:fec3:844a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1464 errors:0 dropped:0 overruns:0 frame:0
TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:135419 (132.2 KiB) TX bytes:4230 (4.1 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Output of route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 eth0
Output of dhclient -v eth1
is:
Listening on LPF/eth1/08:00:27:c3:84:4a
Sending on LPF/eth1/08:00:27:c3:84:4a
Sending on Socket/fallback
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 6 (xid=0x6afb6c4c)
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 9 (xid=0x6afb6c4c)
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 15 (xid=0x6afb6c4c)
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 18 (xid=0x6afb6c4c)
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 13 (xid=0x6afb6c4c)
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
Moreover the same machine with the same configuration works well on Windows XP. The problem is only on Windows 7.
Source: (StackOverflow)
I am trying to install libtirpc on RHEL 6.5 but it fails and asks for dependencies.
Why here it is showing three GLIBC versions 2.14, 2.15 and 2.16. ??
Does it mean that any of these three versions can be installed ??
I already have libc.so.6 installed by
bash-4.1# rpm -qf /lib64/libc.so.6
glibc-2.12-1.132.el6.x86_64.
bash-4.1# rpm -ivh libtirpc-0.2.4-0.3.el7.x86_64.rpm
warning: libtirpc-0.2.4-0.3.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
error: Failed dependencies:
libc.so.6(GLIBC_2.14)(64bit) is needed by libtirpc-0.2.4-0.3.el7.x86_64
libc.so.6(GLIBC_2.15)(64bit) is needed by libtirpc-0.2.4-0.3.el7.x86_64
libc.so.6(GLIBC_2.16)(64bit) is needed by libtirpc-0.2.4-0.3.el7.x86_64
There are many other private RPMs which depend on glibc-2.12-1.132.el6.x86_64, so I dont want to touch glibc-2.12, is that possible to install same RPMs of different version. ??
Source: (StackOverflow)
This question already has an answer here:
Do anybody have idea about full form of rc.d at?
/etc/rc.d
It contain scripts to is used to control the starting, stopping and restarting of daemons. But what exactly meaning of rc here, do anyone have clue?
Source: (StackOverflow)
I've got wlan0 and wlan1. Each interface should connect to a different SSID.
I would like to use wpa_supplicant for both.
I can put the two networks in /etc/wpa_supplicant.conf, but how do I tell which one each interface should use?
(RHEL 6.3)
Source: (StackOverflow)
We have a RHEL5.5 server, and the system engineering guys at my company said that they have recently installed Intel C++ 11.1 compiler on the box.
But, when I do a cc -v, I get
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)
I did a which cc, and it points to /usr/bin where cc is a soft link to gcc. People at the system engineering aren't too clear about the path where they have installed it either.
There is nothing that says if this is the Intel compiler or the default gcc compiler.
So, is there a command that lists the compiler name?
Source: (StackOverflow)
I have been trying to setup a ssh server on my desktop for remote access and have been running into a few issues. The first I have found is that sshd is not starting on boot. As soon as I run:
sudo service sshd start
manually I am able to ssh into the computer from itself, so I know ssh daemon is installed properly. Now I just want it to start at boot.
After looking into it I have found in
/etc/rc.d/rc3.d
I have found a script
K##sshd
or something along those lines. I believe the K implies that when entering run-level 3, it is shutting down sshd. Is all I need to do to make it start is create a file S##sshd to have it restart or is there a better way to go about this. I figured I should get some more knowledgeable opinions before I ran around renaming and creating random files on a hunch.
Source: (StackOverflow)
I've been using Gnu screen for some time now, and I absolutely love it!
I installed it on a second RHEL server of mine, and I'm seeing odd behavior when I issue a 'who' on the new server.
'who' shows me as logged in twice on the new server, but only once on my old server. I have identical configs as far as I can tell.
I use PuTTy from Windows to SSH to my RHEL servers. Shell is xterm. When I log-in I run screen
then who
and this is what I see:
Server 1 (old server):
svenglar@server1 ~$ who
<....>
svenglar pts/3 Oct 11 23:22 (tsv1.home.local)
Server 2 (new server):
svenglar@server2 ~$ who
<....>
svenglar pts/3 Oct 11 23:22 (tsv1.home.local)
svenglar pts/4 Oct 11 23:24 (:pts/2:S.0)
I've checked my /etc/bashrc, ~/.bashrc ~/.screenrc ~/.bash_profile, and they are all the same. I also have the same version of RHEL on both servers.
Anyone know what could be causing this?
Source: (StackOverflow)
Last week I installed SL6.2 on my tower using the LiveCD iso and unetbootin without issue. I was taking my time configuring it since it was my first real jump into linux. I ran into problems when I was attempting to replace the nouveau video drivers with the NVIDIA drivers. I was following the instructions here to do so, and had successfully gotten through step 3, however when I rebooted at the end of that step, it failed to boot due to a kernel panic.
After fighting with it for a while, I figured I would cut my losses and restart, so I attempted to boot from another flashdrive that was made from the same LiveCD as before and unetbootin, however I got a kernel panic consistently during the loading splash screen (it was at a different load point than the previous one).
I assumed that the corrupted install on the harddrive was conflicting with the USB boot somehow, so I successfully booted into gparted and removed all the partitions on the drive. Now, however, I am still getting a kernel panic from the USB boot, always at the same point, and using both the LiveCD and the miniLiveCD.
I am not worried about losing any data (obviously), but I am just too inexperienced at linux to even fully diagnose the problem. Right now I am capable of getting into the grub commands if that could help diagnose the problem, but any help at all to point me in the right direction would be greatly appreciated.
UPDATE: I have successfully booted Ubuntu 10.10 (just happened to have the iso sitting around) using unetbootin, so it seems to be Scientific Linux specific. Is it possible that something in the SL install is damaged by a bad sector on the flash drive I am using?
Source: (StackOverflow)