Common Linux Command

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Common Linux Command as PDF for free.

More details

  • Words: 1,002
  • Pages: 3
Common LINUX Command The following is a list of commonly used LINUX/UNIX commands which may be of value during your Telnet sessions. Remember that LINUX/UNIX is case sensitive. Options or flags which can be used with a command are placed in [ ]. The [ ] are not part of the command and should not be included in the command that you type. login username

allows you to login for a Telnet session

passwd

changes your password

logout

logs you out of a Telnet session

cd

change directory; cd .. moves you backwards to the next higher subdirectory level; cd / moves you to the highest directory level

chmod permissions filenames

changes the permissions for a file; permissions should include a letter designating who gets permissions (u for the user, g for the group, o for others, or a for all) followed by a + or - (to give or take away the permission) followed by the kind of permission (r for read access, w for write access, x for execute if the file is a program or script); the complete command that you type should look like: chmod g-w filename

chown user:group filenames

changes ownership of a file

clear

clears the screen

cp oldfiles newfiles

copies a file; this leaves the old file intact and makes a new copy with a new filename

date

tells you the current date and time

df

displays how much space on the disks (harddrive partitions) is free

du [-a] [-s] directories

tells you how much disk space your files occupy; the -a option displays the space used by each file, not just each directory; the -s option displays the total space used for each directory but not subdirectory

finger username@servername

provides information concerning a user; finger without the username@servername will provide information concerning who is using the server at that time

help

provides online help; several topics have been included in the help system available on the servers

ls [-l] [-a] [-p] [-r] [-t] [-x]

lists the files in a directory; -l displays detailed informtion about each file and directory, including persmissions, owners, size and time/date when the file was last modified;

-a option displays all the files and subdirectories including hidden files (with names that begin with a dot); -p displays a slash at the end of each directory name to distinquish them from filenames; -r displays files in reverse order; -t displays files in order of modification time; -x displays the filenames in columns across the screen. lynx servername or URL

Lynx is a text-based, non-graphical web brower for use in Telnet session

man [-k keywords] topic

displays the reference manual page about a LINUX command; the -k keywords option allows you to see all man pages that contain that keyword; topic is the command or topic which you want information about

mesg [n|y]

lets you control whether other people can use the talk command to interrupt you with on-screen messaging; mesg n will block the interruptions; mesg y will allow interruptions

mkdir new_directory

makes a new subdirectory with the name specified by new_directory

mv [-i] oldname newname

renames a file or moves it from one filename or directory to another; the -i option tells mv to prompt you before it replaces an existing filename

nslookup IP address or server alias

provides conversion of an IP address to an alias of a computer if it is registered in DNS (Domain Name Service) or will provide the IP address for an alias

passwd

changes your password

pine

a program which allows you to read and send mail; information concerning the use of pine can be found elsewhere in the documentation or by reading the online manual pages for pine ( man pine )

ping IP address or server alias

sends a ping packet to another server; this provides information concerning the time it takes for information to make the round trip to the other computer; it will also tell you whether the other server is on-line at that time

ps

displays information about your processes/jobs/programs which are running on the server

rm [-i] [-r] filenames

removes or deletes files; the -i option asks you to confirm that you want to delete each file; the -r option is dangerous because it allow you to delete an entire directory and all of the files it contains

rmdir directory

removes a directory; you can use the -i and -r options which are described in the rm command

tail [-r] [-lines] filename

displays the last few lines of a file; -r displays the lines in

reverse order; -lines specifies the number of lines, starting at the end of the file, you want to see talk username@servername

allows you to talk to another user by typing messages to each other on-screen; to prevent someone from talking to you, see the mesg n command

touch [-a] [-c] [-m] [date] filenames

changes the date and time for a file without changing the content of the file; -a changes onlyt the date and time the file was last accessed; -c doesn't create a file if it does not already exist; -m changes only the date and time the file was last modified; date specifies the date and time to give the file in the mmddhhnn format (month, day, hour, minute); touch with a new filename with create a new, empty file.

traceroute IP address or server alias

provides information concerning the route which packets must take to get from your computer (the server in this case) to a remote computer/server; typically used to diagnose possible problems in packet routing

vi

VI is a text editor. Further information concerning the editing commands for VI can be found in the help document.

w

provides information concerning who is logged into the system and some details on how they are connected

who

tells you who is using the server at that time

write username

sends a message to another person using the system; to prevent someone from writing to you, see the mesg n command

Related Documents

Common Linux Command
November 2019 16
Linux Command
November 2019 22
Linux Basic Command
June 2020 8
Linux Command Cn
November 2019 18