440 likes | 462 Views
Learn how to login, work with X-Window, manage files, use GNOME desktop, and understand UNIX commands. Explore different window managers such as CDE, KDE, and more. Discover the functioning of X-Window and its client-server model. Access online manuals and run commands in UNIX effectively.
E N D
Contents • Basic things in Unix - login, logout, password, online manual - X-window - file system - commands for files and directories - file attributes - editor
Login and Logout • Login account • you already have one accountin cs.sookmyung.ac.kr • Login • telnet • X-window • Logout • Ctrl-D • logout
Login • Systems you can use • cs.sookmyung.ac.kr • cslinux1.sookmyung.ac.kr • cslinux2.sookmyung.ac.kr • Telnet • telnet cs.sookmyung.ac.kr • Modem • Hyperterminal, 새롬데이터맨 : 710-9251 • 전화접속 네트워킹 : 3789-5656 telnet, ftp, netscape, …
X-window • X-window • developed at MIT • window system based on client/server model • standard window system for UNIX and Linux • X-window의 종류 • X11 by MIT • OpenWin on Sun Solaris, HP/UX, IBM AIX, ... • XFree86 on Linux
Login to X-window • On Unix or Linux Console • login and • startx on Linux • openwin on Solaris • On Window PC • Xmanager on PC • http://www.netsarang.co.kr
X-window의 윈도우 매니저 • 윈도우 매니저의 역할 • 스크린에 나타나는 윈도우를 조정하고 관리한다. • 윈도우 확대, 축소, 이동, 아이콘으로 변환 등 • 윈도우 매니저 종류 • CDE on Sun Solaris, IBM AIX, HP/UX, ... • KDE on Linux http://www.kde.org • GNOME on Linux http://www.gnome.org • Twm, Mwm, Fvwm, Window Maker … on Linux http://www.windowmaker.org
윈도우 매니저 GNOME • Panel • panel applet과 menu 들을 포함한다. • Panel applets은 판넬 내의 작은 프로그램 • 예 : the clock applet • Main Menu Button • Window 98의 시작 버튼과 같은 역할 • Desktop • 프로그램 • 데이터 • 디렉토리
윈도우 매니저 GNOME • 파일 관리자(File Manager) • 이동, 실행 • 복사, 이름 변경, 삭제 등 - 마우스 오른쪽 버튼을 이용 • 참조 • http://www.gnome.org/users-guide/index.html
X-window의 동작 과정 Display X client Terminal Screen X server X client Mouse Keyboard X client
X-window의 동작 과정 • Display • consists of a terminal screen, a keyboard, and a mouse • X server • handles all the input and output of data at the display • one X server to each display • 보통 X-window는 X server를 의미함.
X-window의 동작 과정 • .X client • 디스플레이의 사용자와 대화하는 X 응용 프로그램 • X client의 예 - xterm, xclock, netscape, …. • 출력을 X server에 요청 • X server로부터 입력을 받음 - 마우스 클릭, 윈도우 이동, 키보드 누름, …
X-window의 특징 • Client/Server 기반 윈도우 시스템 • X server와 X client • 네트워크 기반 윈도우 시스템 • X server와 X client가 같은 호스트 혹은 • 다른 호스트에 위치할 수 있다.
Running Commands • Shell • a command line interpreter on UNIX • Bourne shell, Korn shell, C shell • date [yymmddhhmm [.ss] • display or set current date and time • Online manual • man [chapter] word • man -k keyword $man -k mode $man chmod $man 2 chmod
Special Characters • Special characters $ stty all erase kill werase rprnt flush lnext susp intr quit stop eof • Terminating a process - Control-C - standard way to interrupt the foreground job • Pausing output - Control-S/Control-Q
Special Characters • End-of-input - Control-D • passwd - to set or change your password - at least six letters, should not a word from a dictionary
File System • Directory hierarchy - tree structure - root directory bin usr dev home chang
File System • Home directory • shell starts in your home directory when you login • assigned by the system administrator • Current working directory - a directory where your shell is currently working - home directory, when you login - How to change cwd ? • Moving to a directory - cd [directoryName]
Pathname • Absolute path name • specify a file or directory by a pathname from the root directory / • /home/chang • Relative path name - specify a file or directory by a pathname relative to the cwd . : current directory .. : parent directory
Commands for files • Listing the contents of a directory ls -adglsFR {fileName}* {directoryName}* -a : hidden files starting with . -l : long listing including permission, owner, modification time -d : directory not files -g : file's group -s : size -F : file type ( *, /) -R : recursively
Commands for files • Listing a file cat -n {fileName}* more -f [+lineNumber] {fileName}* page -f [+lineNumber] {fileName}* head -n {fileName}* tail -n {fileName}*
Commands for files • Renaming a file - mv -i oldFileName newFileName - mv -i {fileName}* directoryName - mv -i oldDirectoryName newDirectoryName • Making a directory - mkdir [-p] newDirectoryName - creates a new directory
Commands for files • Copying a file cp -ir {fileName}* directoryName cp -i oldFileName newFileName • Deleting a file or directory rmdir {directoryName}+ rm -fir {fileName}
Commands for files • Printing a file lpr -m [-Pprinter] [-#copies] {fileName}* • Counting the words in a file wc -lwc {fileName}*
File attributes • file name • the number of physical blocks • file modification time - the the time that the file was last modified • file owner/group - the owner of the file • every process has an owner, which is the login user id • whenever a process creates a file, the file's owner is set to the process's owner
File attributes • file type
File attributes • permission mode
Determining terminal's type • Terminal type - vi or emacs need to know your terminal type ! - Set shell envirionment variable $TERM to your terminal type (csh) %setenv TERM ansi %tset (sh) $set TERM=ansi $tset • Setting terminal type in shell's startup file .cshrc (csh) .profile (sh)
Changing terminal's characteristics • Changing metacharacter setting • The default metacharacter settings may be overriden • stty -a {option}* {metacharacterString <value>}* erase, kill, lnext susp, intr, stop, eof $ stty erase ^b
Editor vi • A standard editor in UNIX %vi filename • Two modes • command mode initial mode, editing commands • text entry mode enter text you'd like to enter
Editor vi • How to enter text entry mode • By typing i, a, o, O, or R in command mode • i Text is inserted in front of the cursor • a Text is added after the cursor • o/O Text is added after/before the current line • R Text is replaced (overwritten) • You can not move around the screen using the cursor keys in text entry mode • Back to command modeby typing Esc
Electronic Mail • Elm • a popular mail system in UNIX • sending mail % elm chang@cs.sookmyung.ac.kr (1) automatically vi is invoked and edit a mail (2) quit by typing :wq and send by typing <Enter> • reading mail % elm graphical user interface : move cursor and type return
Electronic Mail • mail • mail -H [-f fileName] {address}* • sending mail % mail chang@cs.sookmyung.ac.kr % mail chang@cs.sookmyung.ac.kr < filename • reading mail % mail
Electronic Mail • Netscape mailer • 윈도우에서 사용하는 netscape mailer와 동일하게 사용 가능