You have an unmanaged VPS server and have a script that creates users?

It's always good to know the number of users that your Linux server has.

If you have a control panel it would be easier to find out the number of users.

You can use this command to get the number of users. It will read the the contents of /etc/passwd file which stores the user list and then we'll use the wc command to count the lines. wc normally counts words but by passing -l parameter it will count the lines.

The first 10-15 lines of the /etc/passwd file contain system users such as root, cron etc.

cat /etc/passwd | wc -l

Photo credit: Gabriel Heinzer @6heinz3r on unsplash