Showing posts with label LINUX solutions. Show all posts
Showing posts with label LINUX solutions. Show all posts

Friday, 28 April 2017

1.   ls -lrt | grep "^1"

Used for command to list all the links from a directory


2.   # touch file
     # chmod 400 file

Used to Create a read-only file in your home directory

3.   uname -a 
     used for finding which operating system your system is running on in UNIX

4.    killing a process find PID and use kill -9 PID command

5.  For bringing a process back in foreground use command "fg jobid" and for getting job id you use command      jobs

6. By using "top" command in UNIX you will find which process is taking how much CPU

7. By using "df" command in UNIX. For example "df -h ." will list how full your current drive is

Sunday, 14 August 2016

bash: ./lmgrd: /lib64/ld-lsb-x86-64.so.3: bad ELF interpreter: No such file or directory

this is the problem you will face while "Configuring a License Server on Linux/UNIX for Mentor Graphics VLSI tools":

Solution:

You will need to install the redhat-lsb library by running this command :

# yum -y install redhat-lsb
 

Wednesday, 15 July 2015

FTP server

Here we download data from FTP link

1. Make sure yum server is working on your RHEL machine
2. install vsftpd, ftp pakages

yum install vsftpd  or
#rpm -ivh  rpm -ivh vsftpd-2.2.2-11.el6_4.1.x86_64.rpm


yum install ftp or
#rpm -ivh ftp-0.17-54.el6.x86_64.rpm

3. make firewall off
#iptables -F

4. make enforcing permissible

# getenforce
[root@localhost packages]# getenforce
Enforcing

the  setenforce 0

it is temporary solution to make enforcing permanently off do the changes under Selinux policy

5. service vsftpd restart

#service vsftpd status

to make service on permanently
#chkconfig vsftpd on

6. #getsebool -a | grep ftp
     #setsebool -ftp_home_dir 1

#service vsftpd restart
#service ftp restart

to check working of ftp


[root@localhost ~]# ftp 198.182.52.51
Connected to 198.182.52.51 (198.182.52.51).
220-
  
230 Anonymous access granted, restrictions apply
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> binary
200 Type set to I
ftp> cd /pub/outgoing
250 CWD command successful
ftp> get CDC2015.tar.gz
local: CDC2015.tar.gz remote: CDC2015.tar.gz
227 Entering Passive Mode (198,182,52,51,143,50).
150 Opening BINARY mode data connection for CDC2015.tar.gz (51047711 bytes)
226 Transfer complete
51047711 bytes received in 92.6 secs (551.33 Kbytes/sec)
ftp> quit
221 Goodbye.





 

Saturday, 11 July 2015

Solution for: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory

First of all yum server should be properly installed and working:

for installation of of "libexpat.so.0" you can go for

# yum install libexpat.so.0
 this will install "libexpat" for 32 bit OS

for the installation in 64 bit os

# yum install compat-expat1

Package compat-expat1-1.95.8-8.el6.x86_64 already installed





to check version of redhat OS
#uname -a  or
#uname -r

Solution of :: error while loading shared libraries: libtermcap.so.2: cannot open shared object file: No such file or directory

here target package is libtermcap.so.2
 so commands are:
1. # rpm -qf /lib/libtermcap.so.2   -->> this will produce following result on terminal


compat-libtermcap-2.0.8-49.el6.i686

2.#  rpm -qa | grep  compat-libtermcap  --->> this will produce the following results on terminal

compat-libtermcap-2.0.8-49.el6.i686


from i686 it is clear that  this package is for 32bit OS

3. # find /lib -name libtermcap.so.2

TO INSTALL its 64bit version ::
first of all yum server should be properly working if it is working then use the following command for installation of libtermcap.so.2:::
# yum install compat-libtermcap

(
In Red Hat 6 the library name has changed to compat-libtermcap. If you try to install just libtermcap via Yum it will fail saying "No package libtermcap available." If you try to install libertermcap.so.2 (based on the error message) via Yum it will only install the 32-bit library by default "compat-libtermcap-2.0.8-49.el6.i686"

But, because we are using the 64-bit installer, we need the 64-bit compat-libtermcap library installed. The command to install compat-libtermcap on Red Hat 6 is "yum install compat-libtermcap" This will install the correct library you need "compat-libtermcap-2.0.8-49.el6.x86_64"
)
 
 

Wednesday, 24 June 2015

Wednesday, 18 March 2015

Solution for VMware Problem :

transport (VMBD) error -44:Message.The VMware Authorization Service is not running

Solution:

Start / Control Panel / Administrative Tools / Services, clicked on VMware Authorization Service in the list & click the Start link on the left.

Sunday, 1 March 2015

To change the runlevel

By default runlevel in #vi /etc/inittab is5
that is GUI in this file you do the changes at
you can see at the end of this file.

To remount the system in read write open mode if you are not able to boot due to error in fstab file

#mount -o remount , rw /

Saturday, 28 February 2015

GPT issue and solution

Modern systems coming with two type of BIOS options:
1.UEFI specification
2.Legacy.


if you Legacy and deactivate UEFI option you can install redhat simply by having /boot option. If you go with default option UEFI then you have to do installation by creating::

you have to create /boot/efi instead of only  /boot.

then after installation   you cannot be able to use "fdisk" option any more. because now you are working in GUID partition table (GPT) not in MBR.

which is the newfangled replacement for the tired and inadequate MS-DOS partition table, and why you might want to use it instead of the familiar old MBR. GPT is part of the UEFI specification, and because Linux is a real operating system with modern features you can use GPT with both UEFI and legacy BIOS.

The Globally Unique Identifiers Partition Table is the modern replacement for the antique MS-DOS Master Boot Record (MBR). The MBR was born in the early 1980s for IBM PCs, way back in the thrilling days of ten-megabyte hard disks. The MBR must live on the first 512 bytes of your storage device, and it holds the bootloader and partition table. The bootloader occupies 446 bytes, the partition table uses 64 bytes, and the remaining two bytes store the boot signature. The MBR is limited to four primary partitions, and a single primary partition can hold an extended partition which can then be divided into logical partitions. Linux supports (theoretically) an unlimited number of logical partitions. In the olden days Linux maxed out at 63 IDE partitions and 15 SCSI partitions because the kernel was limited in the total device numbers it could allocate. udev allocates device numbers dynamically, so those limitations are gone.
fig-1 GPT partitions
Figure 1: GPT has just partitions, not primary and logical partitions.
The MBR is tiny and inflexible, and has lasted this long thanks to clever hacks to get around its limitations. Logical Block Addressing (LBA) gets around the limitations of its original cylinders, heads, and sectors (CHS) addressing. The traditional hard disk block size of 512 bytes limits partitions to 2TB in size, though more clever hackery supports the new 4096-byte sectors for a maximum 16TB partition size.











GPT: GPT is part of the Unified Extensible Firmware Interface (UEFI) specification, and on Linux you don't need an EFI BIOS to boot from a GPT partition, but can use it with legacy BIOS systems

GPT does not have primary and logical partitions, but just partitions as GParted

TO use "gdisk" for GPT you have to install the "gpt rpm package". https://www.dropbox.com/s/qmkzocja04s9rv7/gdisk-0.8.10-159.1.x86_64.rpm?dl=0 .

so if you use fdisk you will be get an error and if ty to use gdisk you are not able yo use that without gpt package. ashow below




to see the UUID details "#blkid "  command has been used.
you can convert MBR partition to GPT in between the installation

inject "CTRL+ALT+F2" during your installation process to go on command line with 'parted' utility.


#parted
(parted) print /dev/sdb
 (parted) select /dev/sdb
(parted) mklabel gdt
(parted) yes
print /dev/sdb
quit
then return to installation process with CTRL+ALT+F6

 for Disk partition you can use:

Cfdisk is a linux partition editor with an interactive user interface based on ncurses. It can be used to list out the existing partitions as well as create or modify them.
Here is an example of how to use cfdisk to list the partitions








Tuesday, 3 February 2015

Second Method : How to Share the Folder with Guest as Window OS and Linux on VMware

  create folder in WINDOW OS and share it with full permissions
 then check the ip of the VMware Network Adapter with command :ipcomfig

  ping from LINUX terminal with that IP as ping 192.168.56.1
if every thing OK you will get reply back

 As shown above do the all setting and press connect button
A new window will open as shown below give the username domain and password of the system as shown below and you will get the shared data
ENJOY :-)
 


if you are not able to enter into the .bashrc file and commands like 'ls' and 'vi' are not working
and you are getting some error like this:  command couldnot be located because '/bin' is not included in the PATH environment variable
then type  this :

export PATH=/usr/bin:/bin

problem will be sorted out

Thursday, 29 January 2015

How to Share the Folder with Guest as Window OS and Linux on VMware

First of all do the following shown setting for the virtual machine
A folder from E drive has been added here from add button
In virtual machine this folder is automatically mounted in /mnt/hgfs
you can check this : #cd /mnt/hgfs
                              #ls
                              # Ubunto


How to KILL a Logged in user in LINUX

pgrep -u username
ps -fp $(pgrep -u username)
killall -KILL -u username
userdel -r username

Second Method:
ps -u username  #it will give you PID (personal Identity Number )of the user
kill -s 9 <PID number>











Tuesday, 27 January 2015

Difference between df-h and fdisk command

df -h displays all of the mounted partitions. fdisk -l displays all of the partitions that exist on your disk.
Apparently there are some partitions which exist, but which are not mounted

fdisk shows you your attached disk spindles and how they are partitioned.
df on the other hand shows you the free space on filesystems. if you know a little bit of Linux or any variant of UNIX for that matter, you should know the difference between a filesystem and a disk device


Thursday, 11 December 2014

To Sort out the Problem Related to JAVA eclipse in Ubunto12.10 after Updating Eclipse.

After Updating Eclipse I was not able able to generated Java Project as I nevigate to new -> Project , I am not given the option of java project  as shown below:
  Go for the following commands these will sort out your problem



sudo apt-get update && sudo apt-get upgrade

sudo apt-get remove eclipse
sudo apt-get purge eclipse
rm -r ~/.eclipse
sudo apt-get install eclipse


I didn't need to remove all the locations which showed up on whereis eclipse 
Besides, you can also try doing
sudo apt-get install --reinstall eclipse-jdt
if the previous commands don't work out .


Restart your eclipse it will work now enjoy:-)




Sunday, 7 December 2014

How to share the Folder from Host Window 7 OS with virtually installed Ubuntu

1. create a folder in Host windows OS, which is to be shared
2. Go to Devices in  Oracle Virtual BOX select

Add caption

3. select the folder to be shared as shown above, make it permanent 
4. go to the terminal and go to media directory  $ cd /etc/media
5. make a new directory with the same name as that of the folder which is to be shared as

$   mkdir udun_share
now enter this command

$  Sudo mount -t vboxsf udun_share /media/udun_share then enter


go to the media and directory named udun_share data is shared between host and virtually installed ubuntu in oracle vitualbox

Cannot access the kernel driver problem in Oracle Virtual BOX 



Go to
C:\Program Files\Oracle\VirtualBox\drivers\USB\filter
Select VBoxUSBMon.inf and click the right mouse button. Then pick Install.
Go to
C:\Program Files\Oracle\VirtualBox\drivers\vboxdrv
Select VBoxDrv.inf and click the right mouse button. Then pick install.
VirtualBox should now work again as expected.

Restart....... and enjoy