Give Your Desktop A Sweet Outlook With Sweet Themes – NoobsLab

It is feels bit difficult to describe this theme we are going to introduce here today.

Sweet

theme pack looks and feel very different on the desktop but at the same time make the Linux desktop elegant and eye catching. Maybe these are not perfect looking themes available but it lineup in the perfect theme queue. You may say, I don’t like it in screenshots, let me tell you that you should install it on your system and if you don’t like then you already have option to remove it. So there is no harm to try a new thing, maybe this is next best theme pack for your Linux desktop.

There is not much information available about themes on its page; this pack offers three variants Sweet, Sweet-Ambar and Sweet-Dark, you can choose whatever fits your needs. These themes are available for Gtk-3 and Gtk-2, and targets multiple desktop environments such as Gnome, Gnome Shell, Cinnamon, Xfce, Mate, Budgie etc. We are offering Sweet themes via our PPA for Ubuntu/Linux Mint. If you are using distribution other than Ubuntu/Linux Mint then download directly from theme page and install it on this location “~/.themes” or “/usr/share/themes”. If you find any kind of bug or issue within this theme then report it to author and hopefully it will get fixed very soon in the next update.

sweet theme

sweet theme
sweet theme

Available for Ubuntu 18.04 Bionic/18.10/and other Ubuntu based distributions
To install Sweet theme pack in Ubuntu/Linux Mint open Terminal (Press Ctrl+Alt+T) and copy the following commands in the Terminal:
That’s it

Source

Snaps for Linux are a massive success

One of the big knocks against Linux-based operating systems is lack of software. The truth is, there are countless excellent programs for both productivity and fun. One fair criticism, however, is fragmentation between distributions. For end users, it can be difficult installing an app that isn’t designed for their distro. And yeah, that has been a pain point for years.

Thankfully, Canonical — maker of Ubuntu — aimed to alleviate that problem with Snaps. These containerized packages can be installed on pretty much any Linux distribution, making things easier for both users and developers. But has the organization’s standard been a success? Apparently, very much so. As a way to celebrate yesterday’s release of Cosmic Cuttlefish, Canonical shares the following infographic.

ALSO READ

As you can see below, not only are there many Snaps available, but there are several top-tier programs, such as Slack, Firefox, Spotify, Plex, Skype, and more! After reviewing the infographic, please head to the comments below and share your thoughts.

Photo Credit: WAYHOME studio/Shutterstock

Source

The Featureful Release of Nextcloud 14 Has Two New Security Features

Last updated September 14, 2018 By John Paul

Nextcloud is an open source cloud storage and collaboration platform that you can host on your own servers. It’s considered one of the best cloud storage available for Linux. Even if you cannot host Nextcloud on your own, you can opt for one of the Nextcloud providers for a small fee.

Recently, Nextcloud announced the release of version 14 of their software. The update brought improved security, collaboration features, and more. Let’s take a look.

New features in Nextcloud 14

Nextcloud wallpaper

Here are the main new features in the latest release of Nextcloud.

1. Video Verification [Security Feature]

When you share your files and documents with others on the web, there is always a chance that someone else will intercept that information. Nextcloud 14 allows you to video chat with the person you plan to share your information with, to make sure that they are who they say they are.

2. Improved 2-Factor Authentication [Security Feature]

2-Factor Authentication (2FA) is a common method of protecting access to your information. Instead of just relying on a password, 2FA requires a second form of digital verification. Nextcloud 14 now supports the use of “the secure messaging apps Signal and Telegram” and SMS to verify your identity.

3. Collaboration

Nextcloud allows you to edit or comment on files shared with you. Now, if you accidentally delete a file that has been shared with you, you can easily recover it. Files can also be shared with groups on other Nextcloud servers using federation.

4. Group Communication

Video calling has been a big feature of Nextcloud and received some work.

  • Join without Camera or Microphone
  • Join multiple chats in different browser tabs at the same time
  • Conversations can be pinned to the top of the conversation list
  • Chat works without requesting Camera/Microphone
  • Participants can be @mentioned in the chat now
  • Display number of unread chat messages + special highlight when you got mentioned in the conversation list
  • System chat messages (basically inline activity stream for the respective conversation)

5. Improved Server Management

The system administrator tools have been improved, as well. The user management system was optimized to support a larger number of users. The update process has been improved to show administrators what changes will be made by the updater and if there are updates to the installed apps.

6. Privacy Compliance

Nextcloud 14 is compliant with the European GDPR and the upcoming California Consumer Privacy Act. Release 14 includes a “Data Protection Confirmation app and separate audit log file”. Between the available Nextcloud applications and the included documentation, enterprises can very easily make sure that they are compliant with the current privacy regulations.

How to get Nextcloud 14

If you want to try Nextcloud 14 right now, you can download it from their website. If you already have Nextcloud 13 installed, you will be able to upgrade to 14. However, you probably won’t have the option to do so right away. Nextcloud will be rolling out the update incrementally, If you are in a hurry, you can get it right away by switching to the beta update channel. just be sure to set it back to the normal update channel after it installs. However, it would be a good idea to wait before upgrading to avoid system crippling bugs.

Do you have Netcloud 14 install? If so, do you like the new features? If not, will these new features persuade you to install it? Let us know in the comments below.

If you found this article interesting, please take a minute to share it on social media, Hacker News or Reddit.

About John Paul

My name is John Paul Wohlscheid. I’m an aspiring mystery writer who loves to play with technology, especially Linux. You can catch up with me at my personal website

Source

How to check which libraries are used by a program or process on Linux ?

To find out what libraries a particular executable depends on, you can use ldd command. This command invokes dynamic linker to find out library dependencies of an executable.[ram@linuxforfreshers.com]$ldd /usr/bin/ssh linux-vdso.so.1 => (0x00007ffe099dc000) libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f578f64a000) libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f578f26e000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f578f069000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f578ee50000) libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f578ec35000) libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f578e9ed000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f578e628000) libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f578e3ea000) /lib64/ld-linux-x86-64.so.2 (0x000055f5ccd53000) libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f578e11e000) libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f578deef000) libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f578dceb000) libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f578dadf000) libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f578d8db000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f578d6bc000)Note that it is NOT recommended to run ldd with any untrusted third-party executable because some versions of ldd may directly invoke the executable to identify its library dependencies, which can be security risk.Instead, a safer way to show library dependencies of an unknown application binary is to use the following command.objdump -p /path/to/program [ram@linuxforfreshers.com]$objdump -p /usr/bin/ssh | grep NEEDED NEEDED libselinux.so.1 NEEDED libcrypto.so.1.0.0 NEEDED libdl.so.2 NEEDED libz.so.1 NEEDED libresolv.so.2 NEEDED libgssapi_krb5.so.2 NEEDED libc.so.6

Check shared library dependencies of a running process

If you want to find out what shared libraries are loaded by a running process, you can use pldd command, which shows all shared objects loaded into a process at run-time. lsof -P -T -p Application_PID

Source

Install And Configure ProFTPD On CentOS

ProFTPD Installation

ProFTPd is an Open source FTP daemon, widely used for its granular configuration ability. This is a guide to provide install methods for both CentOS 7 aswell as CentOS 6 and below. You can read more about ProFTPD on the project’s website.

Install ProFTPD

ProFTPD is in the EPEL repository, you will need to install that first:

yum -y install epel-release

Run a yum update to ensure everything is up to date

yum -y update

Install ProFTPD

yum -y install proftpd

Configure ProFTPD

nano /etc/proftpd.conf

Change the server name:

ServerName “ProFTPD server”

To your servers hostname. Go ahead and save the file afterwards.

Enable and Start Proftpd

Go ahead and restart the service and enable it.

On CentOS 7:

Restart the service:

systemctl restart proftpd

Make sure the service will start after a reboot:

systemctl enable proftpd

On CentOS 6(and below):

Restart the service:

service proftpd restart

Make sure the service will start on reboot:

chkconfig –add proftpd
chkconfig proftpd on

Enable FTP in the firewall

If you are currently using a firewall, you will need to allow incoming FTP connections.

Firewalld

Allow the port for incoming:

firewall-cmd –permanent –add-port=21/tcp

then reload the firewall:

firewall-cmd-reload

Iptables

Add the new rule:

iptables -A INPUT -p tcp -m tcp –dport 20:21 -j ACCEPT

Save the new firewall ruleset:

iptables-save > /etc/sysconfig/iptables

Enabling passive connections in ProFTPD

Passive mode can sometimes resolve certain clients ability to connect to the FTP server which may have been blocked by firewalls. If you are having issues connecting remotely, would like you to try to to enable passive connections in ProFTPD you will need to edit /etc/proftpd.conf

nano /etc/proftpd.conf

And add the following lines:

PassivePorts 60000 65535
AllowStoreRestart on
AllowRetrieveRestart on
TimeoutNoTransfer 65535
ListOptions “-la”
TimeoutIdle 65535

You will then also need to add the passive range in the firewall

Iptables:

Add the new rule:

iptables -A INPUT -p tcp -m tcp –dport 60000:65535 -j ACCEPT

Save the ruleset:

iptables-save > /etc/sysconfig/iptables

Firewalld:

Add the new port range:

firewall-cmd –permanent –add-port=60000-65535/tcp

Reload the firewall:

firewall-cmd-reload

Testing The FTP Service

You can test the FTP configuration locally first to ensure the daemon is running by using netstat

# netstat -plan|grep :21
tcp6 0 0 :::21 :::* LISTEN 22089/proftpd: (acc

You can also connect locally by installing the ftp client

yum install -y ftp

And then making a connection to the localhost or 127.0.0.1

# ftp localhost
Trying ::1…
Connected to localhost (::1).
220 FTP Server ready.
Name (localhost:root):

And enter and valid username and password and it should authenticate. If it does not let you in, the authentication messages are written to /var/log/secure.

Jul 17, 2017LinuxAdmin.io

Source

SUSE Linux Enterprise Server 12 SP2 Installation on VMware Workstation

SUSE Linux Enterprise Server 12 SP2 Installation
SUSE Linux Enterprise Server 12 SP2 Installation on VMware Workstation

This video tutorial shows

SUSE Linux Enterprise Server 12 SP2 Installation

on VMware Workstation/Player step by step. This tutorial is also helpful to install SUSE Linux Enterprise Server 12 (SLES 12) on physical computer or laptop hardware. We also test

VMware Tools

(Open VM Tools) features such as Fit Guest Now, Drag-Drop File and Clipboard Sharing on SLES 12 SP2.

SUSE Linux Enterprise Server 12 SP2 Installation Steps:

  1. Download SUSE Linux Enterprise Server 12 SP2 ISO
  2. Create Virtual Machine on VMware Workstation/Player
  3. Start SUSE Linux Enterprise Server Installation
  4. Test VMware Tools Features: Fit Guest Now, Drag-Drop File and Clipboard Sharing

Installing SUSE Linux Enterprise Server 12 SP2 on VMware Workstation

SUSE Linux Enterprise Server 12 SP2 New Features and Improvements

SUSE

has announced the release of a new service pack for

SUSE Linux Enterprise

. SUSE Linux Enterprise 12 Service Pack 2 offers a number of performance improvements and bug fixes. However, the biggest news is SUSE’s support for a wide range of hardware, such as ARM-powered devices. The distribution is also introducing enterprise level support for Raspberry Pi computers. SUSE is one of the first to bring enterprise support for Raspberry Pi and 64-bit ARM v8-A platforms. In mixed IT environments you can easily stay ahead of the curve with full support for IBM Power Systems, OpenPOWER servers and the newest virtualization capabilities of IBM KVM and z/VM.

SUSE Linux Website:

http://www.suse.com/

SUSE Linux Enterprise Server 12 SP2 Minimum System Requirements

  1. Local Installation: 512 MiB RAM, 512 MiB Swap recommended
  2. 2 GiB available disk space (more recommended, 8.5 GiB for all patterns)
  3. 16 GiB for snapshot/rollback of the OS

Hope you found this SUSE Linux Enterprise Server 12 SP2 Installation tutorial helpful and informative. Please consider sharing it. Your feedback and questions are welcome!

Source

ethtool Commands and Examples | Linux Hint

ethtool

is a networking utility on Linux. It is used to configure Ethernet devices on Linux.

ethtool

can also be used to find a lot of information about connected Ethernet devices on your Linux computer.

In this article, I will show you how to use ethtool command on Linux. I will be using Debian 9 Stretch for the demonstration. But any modern Linux distribution should work. Let’s get started.

In most cases, ethtool should already be installed on your favorite Linux distribution. You can check whether ethtool is installed already with the following command:

As you can see, ethtool 4.8 is installed on my Debian 9 Stretch machine.

If you see an error, then ethtool may not be installed on your computer. You can install ethtool very easily in your favorite Linux distribution. I will show you how to install ethtool on Ubuntu, Debian, RHEL 7 and CentOS 7 in the next sections of this article below.

Installing ethtool on Ubuntu and Debian:

ethtool is available in the official package repository of Ubuntu and Debian. So it is really easy to install.

First, update the APT package repository cache with the following command:

Now, install ethtool with the following command:

$ sudo apt install ethtool -y

Installing ethtool on CentOS 7 and RHEL 7:

ethtool is available in the official package repository of CentOS 7 and RHEL 7. You can install it very easily.

First, update the YUM cache with the following command:

Finally, install ethtool with the following command:

$ sudo yum install ethtool -y

Displaying Network Interface Card Information with ethtool:

You can display information about the network interface cards (NICs) connected to your computer with ethtool utility. To do that, you need the network interface name of your network interface card (NIC).

On Linux, every network interface card (NIC) is assigned unique names such as eth0, ens32 etc.

First, find the assigned names of all the available network interfaces of your computer, with the following command:

As you can see, I have only two network interface cards (NICs) connected to my computer. If you have more, it should show up here. The assigned names of my network interfaces are ens33 and enx00e04c42a3fe respectively. Yours should be different. But take a note of these as you will need it from now on.

Now, to display more information about a network interface card (let’s say enx00e04c42a3fe) with ethtool, run the following command:

$ sudo ethtool enx00e04c42a3fe

As you can see, a lot of information about the network interface card enx00e04c42a3fe is listed here.

For example, the supported link modes of your NIC is displayed here.

The currently used duplex mode and speed is displayed here as well. As you can see, it is connected in full duplex mode at 100 Mbps speed.

You can also find out whether your NIC supports auto negotiation from here. If auto negotiation is enabled, your NIC picks a random link mode from one of its supported link modes depending on the Router or switch port it’s connected to.

Checking Which Driver your NIC is Using:

You can also check which driver your NIC is using with ethtool command.

For example, to check for the driver used by one of your NIC (let’s say enx00e04c42a3fe), run ethtool command as follows:

$ sudo ethtool -i enx00e04c42a3fe

As you can see, my enx00e04c42a3fe NIC is using Realtek r8152 driver version 1.08.7. Yours may be different.

Display Network Usage Statistics with ethtool:

You can find out how many packets the NIC sent (Tx or transmitted) and received (Rx or received) using ethtool. You can also find out how many of these packets collided, transmission (Tx) errors and receiver errors (Rx) and many more.

To display your NIC (let’s say enx00e04c42a3fe) statistics, run ethtool as follows:

$ sudo ethtool -S enx00e04c42a3fe

As you can see, a lot of statistics data on your NIC is displayed.

Making your NIC Blink Using ethtool:

Making your NIC blink may sound useless. But imagine a case where your computer has lots of network interfaces. How would you know which port is assigned what network interface name? Well, just blink each network interface and find out for yourself using ethtool. Simple!

To blink a network interface (let’s say enx00e04c42a3fe) with ethtool, run ethtool as follows:

$ sudo ethtool -p enx00e04c42a3fe

This feature may not be available on your NIC card. Check the manual of your NIC card for more information on this.

My NIC card do not have this feature, so all I get is an error.

Setting Speed and Modes on NICs Manually:

At times, auto negotiation may fail and your NIC may use the wrong speed and mode. You can easily fix that with ethtool.

First, check what speeds and modes are supported on your NIC (Let’s say enx00e04c42a3fe) with the following command:

$ sudo ethtool enx00e04c42a3fe

You can find the supported link modes of your NIC in the Supported link modes section and your Routers or Switches advertised link modes on Link partner advertised link modes section as you can see in the marked section of the screenshot below. My NIC and Router supports, 10baseT and 100baseT in Half and Full duplex mode.

Currently, my NIC enx00e04c42a3fe is working in Full duplex mode at 100 Mbps speed.

To change it, let’s say in Full duplex mode at 10 Mbps speed, run ethtool as follows:

$ sudo ethtool -s enx00e04c42a3fe speed 10 duplex full autoneg off

As you can see, the speed is changed to 10Mbps and the duplex mode is full. Also, auto negotiation is turned off.

Getting Help on ethtool:

The ethtool command has lots of options. It’s not possible to show how every option work in this article due to the scope and hardware limitation of my computer.

But you should be able to find what you need on the manpage of ethtool, which you can access with the following command:

So, that’s how you use ethtool on Linux. Thanks for reading this article.

Source

What’s new in Kali 2.0

I’m sure a lot of you have been waiting for the launch of Kali 2.0. I’ve started looking into competitive programming, and hence now have a bit less time for this blog. That being said, I took a few screenshots for you guys to see what Kali 2.0 has to offer.

Kali installed in VMWare 11

 

Some tools
Information gathering tools
Password attack tools
More tools
Web app analysis
And the ones we use all the time, the wireless hacking suites.

For those who want to know the specifics, take a look at the original post on Kali website.

I’m quoting the official website here, just one paragraph –

 

The tl;dr of this release is best explained by comparison: If Kali 1.0 was

focused on building a solid infrastructure

then Kali 2.0 is

focused on overhauling the user experience and maintaining updated packages and tool repositories

. Along with the arrival of 2.0 comes a whole lot of interesting updates… You can head down to our

Kali Linux 2.0 Download

page to get the goodness for yourself.

I think I’ll make my exit here.

Source

How To Install and Use Composer on Debian 9

Composer is a dependency manager for PHP (similar to npm for Node.js or pip for Python). Composer will pull in all the required PHP packages your project depends on and manage them for you.

This tutorial provides the steps necessary to install Composer on Debian 9 systems. We will also cover how to use Composer to create and manage PHP projects.

Prerequisites

Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges and you have PHP installed on your Debian 9 system.

Installing Composer

Follow the steps below to install Composer on Debian systems:

  1. First update the packages index and install the necessary packages with the following commands:

    sudo apt update
    sudo apt install php-cli php-zip wget unzip

  2. Once the dependencies are installed, use the php cli toll to download the Composer installation script:

    php -r “copy(‘https://getcomposer.org/installer’, ‘composer-setup.php’);”

    The command above will download the composer-setup.php file in the current working directory.

  3. We’ll verify the script data integrity by comparing the script SHA-384 hash with the latest installer hash found on the Composer Public Keys / Signatures page.

    Run the following wget command to download the expected signature of the latest Composer installer from the Composer’s Github page and store it in a variable named HASH:

    HASH=”$(wget -q -O – https://composer.github.io/installer.sig)”

    To verify that the installation script is not corrupted copy and paste the following code into your console:

    php -r “if (hash_file(‘SHA384’, ‘composer-setup.php’) === ‘$HASH’) { echo ‘Installer verified’; } else { echo ‘Installer corrupt’; unlink(‘composer-setup.php’); } echo PHP_EOL;”

    If the hashes match, you’ll see the following output:

    If the hashes doesn’t match you will see Installer corrupt. In this case you will need to redownload the Composer installation script and double check the value of the $HASH variable with echo $HASH. Once the installer is verified, you can continue with the next step.

  4. The following command will install Composer in the /usr/local/bin directory:

    sudo php composer-setup.php –install-dir=/usr/local/bin –filename=composerAll settings correct for using Composer
    Downloading…

    Composer (version 1.7.2) successfully installed to: /usr/local/bin/composer
    Use it: php /usr/local/bin/composer

    At this point you have Composer installed on your Debian system. It is installed as a system-wide command and it will be available for all users.

  5. To verify the installation simply type:

    The command above will print the Composer’s version, commands and arguments.

    ______
    / ____/___ ____ ___ ____ ____ ________ _____
    / / / __ / __ `__ / __ / __ / ___/ _ / ___/
    / /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ /
    ____/____/_/ /_/ /_/ .___/____/____/___/_/
    /_/
    Composer version 1.7.2 2018-08-16 16:57:12

    Usage:
    command [options] [arguments]

If you want to use a per-project Composer installation run the following command php composer-setup.php which will create a file named composer.phar in your current working directory. You can use the composer by running ./composer.phar <command>.

Getting Started with Composer

Now that you have Composer is installed on your Debian system we will show you how to create a PHP project with Composer.

Start by creating a a directory which will be the project root and hold the composer.json file. This file describes your PHP project including the PHP dependencies and other metadata.

Create the project directory and switch to it with:

mkdir ~/my-first-composer-project
cd ~/my-first-composer-project

Next, we’ll initialize a new composer.json file using the composer require <package name> command and specify the package we want to download. In this example we will create a sample application that will print the current time using a package called carbon.

Run the following command to initialize a new composer.json file and install the carbon package:

composer require nesbot/carbonUsing version ^1.34 for nesbot/carbon
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
– Installing symfony/polyfill-mbstring (v1.9.0): Downloading (100%)
– Installing symfony/translation (v3.4.17): Downloading (100%)
– Installing nesbot/carbon (1.34.0): Downloading (100%)
symfony/polyfill-mbstring suggests installing ext-mbstring (For best performance)
symfony/translation suggests installing symfony/config
symfony/translation suggests installing symfony/yaml
symfony/translation suggests installing psr/log-implementation (To use logging capability in translator)
Writing lock file
Generating autoload files

Composer will create a composer.json file and download and install carbon and all its dependencies.

If you list your project’s directory, you will see that it contains two files composer.json and composer.lock, and a vendor directory.

-rw-r–r– 1 linuxize users 60 Oct 16 21:02 composer.json
-rw-r–r– 1 linuxize users 6851 Oct 16 21:02 composer.lock
drwxr-xr-x 5 linuxize users 4096 Oct 16 21:02 vendor

  • vendor – the directory where the project dependencies are stored.
  • composer.lock – file containing a list of all installed packages including the exact packages versions.
  • composer.json – file describing the PHP project and all PHP dependencies.

You can search the Composer repository Packagist for PHP packages.

Composer provides autoload capabilities which allows us to use PHP classes without the need to require or include the files.

Create a file named testing.php and paste the following code:

<?php

require __DIR__ . ‘/vendor/autoload.php’;

use CarbonCarbon;

printf(“Now: %s”, Carbon::now());

Let’s analyze the code line by line.

In the first line after the opening php tag we are including the vendor/autoload.php file that was automatically generated by Composer. This file will autoload all the required libraries.

Next we are aliasing CarbonCarbon as Carbon and with the last line we are printing the current time using the Carbon now method.

Run the script by typing:

The output should look something like below:

3. Updating Packages with Composer

To update the PHP packages, simply run:

The command above will check for newer versions of the installed packages and if a newer version is found and the version constraint match with the one specified in the composer.json, Composer will update the package.

Conclusion

You have learned how to install Composer on your Debian 9 machine. We have also shown you how to use Composer to create a basic PHP project. To find more information about Composer visit the official Composer documentation page.

If you have any question, please leave a comment below.

Source

How to kill defunct or zombie process in linux?

HOW TO KILL DEFUNCT OR ZOMBIE PROCESS

A “defunct” processes
is also known as a “zombie” processes. A Zombie
process is referred as dead process which is receding on your
system though it’s completed executing. In one shot we can say it’s a dead
processes which is still in RAM. This process will be in your process table and
consuming your memory. Having more defunct process will consume your memory
which intern slows your system. We have to kill the defunct process in order to
free RAM and make system stable.

What is a zombie process?

When a process finishes execution, it will
have an exit status to report to its parent process. Because of this last
little bit of information, the process will remain in the operating system’s
process table as a zombie process, indicating that it is not to be scheduled
for further execution, but that it cannot be completely removed (and its
process ID cannot be reused) until it has been determined that the exit status
is no longer needed.

When a child exits, the parent process will
receive a SIGCHLD signal to indicate that one of its children has finished
executing; the parent process will typically call the wait() system call at
this point. That call will provide the parent with the child’s exit status, and
will cause the child to be reaped, or removed from the process table.

Why
defunct process are created?

Ans
:
When ever a process ends
all the memory used by that process are cleared and assigned to
new process
but due to programming errors/bugs some
processes are still left in process table. These are created when there is no
proper communication between parent process and child proces

How do I remove zombie
processes from a system?

Well, first you can wait.
It’s possible that the parent process is intentionally leaving the process in a
zombie state to ensure that future children that it may create will not receive
the same pid. Or perhaps the parent is occupied, and will reap the child
process momentarily.

Secondly, you can send a
SIGCHLD signal to the parent (“kill -s SIGCHLD <ppid>“). This will cause
well-behaving parents to reap their zombie children.

Finally, you can kill the
parent process of the zombie. At that point, all of the parent’s children will
be adopted by the init process (pid 1), which periodically runs wait() to reap
any zombie children. Then system need reboot to kill zombie process.

Interview
questions & answers

1. How to find a defunct
process?

Run “ps aux” and look for a
Z in the STAT column.

ps aux | awk
‘”[Zz]” ~ $8 { printf(“%s, PID = %dn”, $8, $2); }’

2. How can I kill a
defunct process?

Ans : Just use kill command

3. Still not able to
kill?

Ans : Then use kill -9 to force
kill that process

4. Still have an issue in
killing it?

Ans : Then try to kill it’s
parent id and then defunct.

#kill
parent-id-of-defunct-pid

#kill -9
parent-id-of-defunct-pid

Ans : If you still find defunct
process eating up RAM then last and final solution is to reboot your
machine(This is not preferred on production boxes).

6.What is orphan process?

Ans : An orphan process is said
to be a process which runs through parent process is terminated, these process
do not know what to do and when to terminate.

7. What is difference
between orphan and defunct processes?

Ans : A defunct process is a dead
process where there is no execution happening whereas orphan process is a live
process which is still in execution state but don’t have parent process

Source

WP2Social Auto Publish Powered By : XYZScripts.com