Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Jan 112010
 

Display current login user information

Answer:

To check your Linux username, use whoami

$ whoami

john

To see your User ID (UID), Group ID (GID) and who groups you belong to, use the command id

$ id

uid=1000(john) gid=100(users) groups=33(www-data),100(users)
Jan 112010
 

Increase the maximum number of open files / file descriptors

Answer:

If you are root, execute the command below

ulimit -SHn 65535

If you want to set it permanently, especially for a particular user, change the file /etc/security/limits.conf to have the following lines (assume user = www-data)

E.g.

www-data hard nofile 65535
www-data soft nofile 65535

And make sure uncomment pam_limits.so from the different files under /etc/pam.d, e.g. sudo, login, sshd, ...

Finally restart your system.