What are some basic commands that I need to know to use Linux?

If you are new to shell (SSH), below are some commands to get you started. A full list of shell commands can be found here http://www.oreillynet.com/linux/cmd/

1. To login into shell on any of our servers you need a SSH client on your PC. Putty is a free program and can be downloaded from http://www.chiark.greenend.org.uk/~sgtatham/putty/.
2. Your username for shell is root and host is your IP number
3. 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
Logs you out of shell.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to use SSH

SSH is a tool used to connect to your server.   This is how 95% of your system is setup.To...

Setting the system date and clock

To set the system clock, use the date command.For Redhat Systems, use the following format: date...

Linux Command Line Cheat Sheet

Moving Around the FilesystemCommands for moving around the filesystem include the following....

Basic Commands for Services

IPTABLES To check firewall rule set using iptables:iptables -L To Flush/Clear the firewall...

How can I check the number connections to a port from an IP?

While logged into your server via SSH as root you can run the following command: netstat...

Powered by WHMCompleteSolution