Posts tagged ‘linux’

How to list Linux running processes

There are many ways to check Linux running processes. The “easy” ways: use small utilities like top or atop. The more powerful but more complex way to use internal linux ps command.

So to install either top or atop simply time this command. Be sure that these utilities already installed. For instance atop is usually not installed by default but supplies in most Linux distribution. In Debian for example.

Installaing atop utility

Once it’s installed simply type atop

atop list process in Linux

to use top command, simply type top.

list processes in linux using top

If for some reason this is not enough for you, you can use ps command. ps -A will list you all processes currently running on your Linux system

List linux processes using ps command

Another utility which is my favorite is htop. Note that it should be also installed (similar way as atop)

installation of htop

list linux processes usin htop

Simple user and password manage in Linux

To add new user in Linux you should have permission to do so. If you are the root user, you can add users into your Linux system.

The command adduser:

add user in Linux

In this example I’ve added user1 into Linux system. To check that user exists in the system, type: id username.

user check in Linux

To change password for user, use the command passwd.

user password change linux

To remove user type user type: userdel

delete linux user

In this example user1 was removed, where the –r option means to remove the home folders and files created by/for user.

How to check last reboot on your Linux system

It is necessary from time to time check when you Linux server was restarted. It might be interesting for security reason, when somebody had access to your server and reboot it. Also it is useful to know how stable is your server, how often it was restarted, manually or independently due to hardware, kernel or software crash.

You the following command: last reboot
last reboot linux

Apache

I will try to be short ad possible with sharing my knowledge and opinion about Apache. Pros and cons will be the best way,

Pros:

1. Popularity. Still number one Web server around internet
2. Well documented and mature product
3. Quite easy to install, easy to configure.
4. Almost all in one solution (build in support of PHP, CGI, PERL)
5. Present in all popular Linux distributions.
6. Compatible with major management systems: Webmin, Fantastico, Cpanel, ISP config. Part of Zend server.
Cons:
1. Technologically outdated
2. Not good for the single server for many concurrent connections
3. Consumes far more RAM than new generation web servers
4. MOD PHP is very slow solution for PHP requests handling

Which Linux to choose

My first experience with linux was in 1997 when I’ve tried SlackWare linux 5.0. I remember how I’ve installed it and look like a reindeer on black screen waiting for the interface, but see nothing, only black screen and #root with blinking cursor. Well… I continued to use Windows NT 4.0 server and silently thinking about linuxzzzz guys as masochists stacked in DOS era. Until bad stuff happened. The project I appeared to be involved in requested from me to create file server for my Linguistics University library with 10 500 000 small TXT files obtained from metropolitan. Having quite fast SCSI in RAID-5 devices I couldn’t realize why the performance is so slow. Another fact that this library set could contains up to 60 sub sub sub folder in depth with different languages folders names and up to 13000 thousands files per folder, by which smart gurus explained me that NTFS file system will not cope with it.

That is the story how I moved to Linux. My first Linux was Debian with EXT3 file system which really eased the described above situation. Since that time I’ve tried almost all major distribution and finally found my favorite CentOS.  At present moment I can gradate the linux distribution by my preference as follow: 1) CentOS; 2) Debian; 3) Ubuntu; and as it is not a Linux… FreeBSD.

Mostly I will try to share my knowledges about Web server solutions, but nothing about using it as a desktop environment. I still prefer windows for this purpose. Hope that this will be useful and helpful for you.