Uploaded by cody Guy

Linux Operating System(1)

advertisement
Linux Operating System
Linux Operating System
•
To connect to a Linux server
–
Use telnet or SSH
•
–
(example: PuTTY http://www.chiark.greenend.org.uk/~sgtatham/putty
/
Need to have a user ID and password
Linux Operating System
Examples of commands:
commands that show who’s logged on.
•
•
•
•
•
who
whoami
who am i
finger
man who
Linux Operating System
Examples of commands:
show names of files/folders
•
•
•
•
ls
ls | more
ls -l
ls –alt
• man ls
//List files/folders
// 1 screen at a time
// long listing
//list all, long format,
// sort by modification time
//manual page on ls
Linux Operating System
Examples of commands:
create/delete directories
• mkdir temp
• mkdir temp/HTMLs
• Rmdir temp/HTMLs
• man mkdir
• man rmdir
Linux Operating System
Examples of commands:
change directories
• cd temp
• cd temp/HTMLs
• cd
//move back to home dir
• cd ..
// move back one level
• cd ../..
// move back two levels
Linux Operating System
• A number of ways to create a text file:
cat > file_name
enter line(s) of text
CTRL – D
//to save & exit
• vi file_name
–i
– esc
• SHIFT + zz
• cat file_name
//insert mode
//edit mode
//to save & exit
//to display file
//contents
Linux Operating System
• A number of ways to create a text file:
echo Hi there! > greetings.txt
echo How’s everything? >> greetings.txt
cat greetings.txt
Linux Operating System
Examples of commands:
cp source destination
• cp temp1.txt temp2.txt
• cp HTMLs temp3
• cp HTMLs/*.html temp2
• man cp
Linux Operating System
Examples of commands:
• pwd
// print working directory
• date
• clear
• history
• exit
Download