HostwareSupport-Linux Hosting technical support for cPanel, Plesk, Directadmin servers

Linux Hosting technical support for cPanel, Plesk, Directadmin and No control panel servers offers and listing
http://hostwaresupport.com/

Nov 15, 2009

Some basic shell commands in LInux......

1. To login into shell on any of our servers you need a SSH client on your PC.  You can use either putty or secure shell. Both are handy tools.....


2. Some useful commands are:


cd /home/ : Will change directory to the /home directory


top: This shows basic information such as uptime, cpu usage, memory usage and processes running.


ls: List all files in a directory.


ls -al: List all files plus hidden files.


ls -alh: List all files and hidden files and display the file size in an easier format.


ps -aux: Show all processes running.


netstat -natp: Show all active tcp connections to your server.


netstat -naup: Show all active udp connections to your server.


tail filename: Show the end contents of a file. This is good for viewing last entries to log files.


who: Show who is logged into shell.


last: Show a list of all accesses to the server ftp and shell.


pwd: shows your current position in the filesystem


locate expression: Will find all files named with 'expression'


find . -type f -exec fgrep -li happy {} \;  ->Will list all files in the current directory that contain the word 'happy'


chown username.group file.txt : Will change the ownership of file.txt to user 'username and group 'group'


chmod 755 file.cgi: Will change the permissions on file.cgi


cp file.txt file2.txt: Copies file.txt to file2.txt


rm file.txt: Deletes file.txt


exit

No comments:

Post a Comment