nixCraft Linux / UNIX Newsletter

Link to [RSS/Feed] nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format

userdel: user vivek is currently used by process 749 error and fix on Linux

Posted: 22 Sep 2017 11:04 AM PDT

I am trying to delete a user named vivek using the userdel command as follows
userdel -r vivek userdel: user vivek is currently used by process 749

How do I fix this problem and delete username vivek on a Debian Linux 9.x server?

How to find bash shell function source code on Linux/Unix

Posted: 22 Sep 2017 09:14 AM PDT

I am a new Linux server user. I cannot figure out how to find out the source code of a bash function named foo() which is defined. How to locate the file where a bash function is defined and how to view the source code of foo() from shell prompt itself?