"The only way of finding the limits of the possible is by going beyond them into the impossible." -
Arthur C. Clarke

Archive for the 'linux' Category

Read the rest of this entry »

Edit Sudoers File - visudo

Monday, May 5th, 2008

1) Open the sudoers file safely:
visudo command edits the sudoers file in a safe fashion.
Attention: you can only run visudo as root
This is a vi editor. Here are some basic vi commands:
To enter vi insert mode: i
To enter vi command mode: [esc]
To exit vi and save changes: ZZ or :wq
To exit vi […]

Read the rest of this entry »

There are a few different ways to restart SSHD remotely.
You will need root access in order to do this.
1) /etc/init.d/sshd restart
2) kill `cat /var/run/sshd.pid` && /usr/sbin/sshd

Read the rest of this entry »

How to disable root login in Linux

Saturday, March 1st, 2008

It is a good idea to disable root login for security purposes and use your login name and use sudo to get root privileges.
First of all, make sure you have your own login name and you can get root privileges by using sudo.
So, open up /etc/ssh/sshd_config and comment out
AllowUsers root
so it will look like:
#AllowUsers admin
You […]

Read the rest of this entry »

Linux shell restricting access

Wednesday, November 14th, 2007

Read the rest of this entry »

See which files has a process open

Tuesday, November 13th, 2007

Command: lsof -p processID
Example: lsof -p 4048
More info, source: http://forum.ensim.com/showthread.php?t=18798

Read the rest of this entry »

How to calculate directory size on linux

Wednesday, September 26th, 2007

du -sxch home/* for subfolders of home
more:
http://community.livejournal.com/linux/1685214.html

Read the rest of this entry »

How to add user (useradd, adduser) Linux

Wednesday, August 29th, 2007

/usr/sbin/useradd -g groupname username
more info here

Read the rest of this entry »

Downlad a file via http in Linux

Sunday, March 4th, 2007

wget
Example: wget http://wilmer.gaast.net/downloads/axel-1.0b.tar.gz

Read the rest of this entry »

recursive chown command in Linux

Sunday, March 4th, 2007

cd /usr/tom
chown -R tom:group *

Read the rest of this entry »