To verify what is the actual IP, first execute “ifconfig –a”, if the output is too long use this command instead “ifconfig –a|more” and look for the “eth0” interface.

To change your Linux IP temporarily: Use the following command, the IP will be changed until next reboot.

ifconfig eth0 [New IP] NETMASK 255.255.255.0

where eth0 is the interface whose IP you want to change.

Permanently changing your Linux IP: For this change, you have to edit /etc/sysconfig/network-scripts/ifcfg-eth0 (if you want to change the IP of a different interface then look for the proper file, for example ifcfg-eth1 for eth1 and so on). Change the following parameters:

DEVICE=eth0 -> Indicates the interface you are changing

BOOTPROTO=none -> Shows if the IP is dynamic (via DHCP) or static

ONBOOT=yes -> Shows if the interface is active after the system starts

HWADDR=00:0c:29:4f:3a:c7 -> Shows the NIC MAC address

IPADDR=192.168.65.129 -> Shows the actual IP used by this interface

NETMASK=255.255.255.0 -> Shows the network mask

Creating a new file

Go to the path where you want to create your new file or write the complete path as shown below:

vi new.txt

vi /etc/new.txt

An empty file will be opened, you can start adding lines to your new file or you just can close it by typing:

:wq!

The file will be created in the path indicated when you executed the “vi” command.

Rename a file

Go to the path of the file or specify it as shown below:

mv oldfile.txt newfile.txt

mv /etc/oldfile.txt /etc/newfile.txt

Be carefull to change the appropiate extension or the file may end up without extension.

Deleting a file

Go to the path or specify it as shown below:

rm file.txt

rm /etc/file.txt

If you get a confirmation prompt just type “y”. If you want to force the operation just add “-f”.

rm -f file.txt

If you want to delete a folder with all its contents type:

rm -rf folder

rmdir –ignore-fail-on-non-empty folder

Creating a folder

mkdir folder

Showing the CPU and Memory Use

top

This will give you a list ordered by the highes CPU usage, to change it to memory usage type “m” and then “q” to return to CPU.

Finding a process

ps -fea|grep process

Showing network connections

netstat

To show the port number instead of the port name (show 25 instead of smtp) use:

[root@tmcent01 ~]# netstat -n

Showing files and folders

ls Shows the names of files and folders

ls -lha Shows all files and folders in a detailed list with sizes of KB,MB,GB,etc…