Skip to main content

Posts

Showing posts with the label linux server

How to find out if a package is installed in Linux?

1) How to find out if a package is installed or not in Linux There are multiple ways to check find locate package is installed in linux machine or not 1.a) Using which command The  ‘which’  command returns an executable path that can be executed when the command is entered in the terminal. # which vi /usr/bin/vi 1.b) Using whereis command The  ‘whereis’  command is used to search the binary, source, and man page files for a given command. # whereis vi vi: /usr/bin/vi /usr/share/man/man1/vi.1p.gz /usr/share/man/man1/vi.1.gz 1.c) Using locate command The  ‘locate’  command performs faster than the find command because it uses an updatedb database, whereas the find command searches in real time. # locate --basename '\nano' /usr/bin/nano /usr/share/nano /usr/share/doc/nano 2) How to find out whether a package is installed or not in Linux, using package manager 2.a) On CentOS / Red Hat (RHEL) 6/7 Use  yum command  or  rpm command  to deter...

Linux directory system

1:  I/usr The /usr mean in Linux is nothing but a directory which usually called as "User Programs". It comprises with several sub-directories and that contains binary files, lib files, doc files and the source code. /usr/bin which contains all the binary files for the user related programs. In some distors we cannot find the root directory of bin which is usually comes under "/bin", hence you can look into the /usr/bin. Eg: at, curl, dd, df ,etc /usr/sbin which also contains the binary file for the Administrators. Means for any system related commands can be find under this directory. Eg: fdisk, cron, ip6tables, lsmod , etc. /usr/lib which contains all the libraries for the /usr/bin and /usr/sbin /usr/local which contains the users related programs, which means when you install anything from the source it may goes directly to the /usr/local/xxxx 2:  /var https://www.javatpoint.com/linux-fhs-variable-directory#:~:text=Variable%20Directory%20(%2Fvar),spool%20files%20...

1 Linux Background and history

Linux History

Linux Commands

  Linux Commands 1.  OS-Release -cat /etc/os-release -cat /etc/redhat-release show os //kernal information -uname  show kernal middleware It is intermediator between hardware and software. -uname  -r what is process architect. -uname -p To show all information -uname -a 2.  Date-CAL -date -cal 3.  Booting in Linux (Run-Levels) Shutdown/Close pc -init 0  Single user mode -init 1 Multiple user mode -init 2 Multiple user mode with network plus full support Not use -init 4 Graphical mode init 5 Reboot the system -init 6 4.  Target command in Linux (systemctl) With the help of target we can manage system specific as well as user specific task. Target command is system Control (systemctl). Basically it is utility, which build to replace 'init' command. What systemctl can do ?  We can find its all commands with the help of single command. write systemctl enter twice TAB button. //it will list all its commands. Show current system mode - systemctl...