What are some basic commands that I need to know to use Linux? Печать

  • 0

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.


Помог ли вам данный ответ?

« Назад

Powered by WHMCompleteSolution