css307 system programming
play

CSS307-System Programming Suleyman Demirel University Fall 2014 by - PowerPoint PPT Presentation

CSS307-System Programming Suleyman Demirel University Fall 2014 by Konstantin Latuta & EN3([ABCDEF]|KZ)04 Week03 GUI review and Introduction to Week03 GUI review and Introduction to Command Line Command Line Learning Goals


  1. CSS307-System Programming Suleyman Demirel University Fall 2014 by Konstantin Latuta & EN3([ABCDEF]|KZ)04

  2. Week03 – GUI review and Introduction to Week03 – GUI review and Introduction to Command Line Command Line ● Learning Goals – Learning some HowTos's of GNOME and Ubuntu 14.04 – Learning basic Linux shell commands and concepts

  3. GNOME Desktop Environment ● GNOME is a popular desktop environment that is default for many distributions ● Alternatives: – KDE – Unity (based on GNOME) – Xfce – LXDE ● Display manager for GNOME is gdm . Others are lightdm (by Ubuntu) and kdm (KDE)

  4. GNOME desktop on older Ubuntu, may be 10.04

  5. HowTo's using GUI ● Login/Logout, suspend, shutdown... ● Locking (Ctrl+Alt+L), account switching... ● Default Applications... ● Locating Applications: press dash and write what you are looking for... ● User directories /home/user ● Nautilus shortcuts, Ctrl+1, Ctrl+2, Ctrl+L, Ctrl+H … ● Alt+F2 to run a command... ● Ctrl+Alt+T to invoke terminal... ● Deleting files … ~/.local/share/Trash/files ● Changing appearance...

  6. Date and Time ● Network Time Protocol (NTP) - is the most popular and reliable protocol for setting the local time via Internet servers ● Detailed configuration should go here: /etc/ntp.conf

  7. Network Manager ● Network Manager utility was developed to make things easier and more uniform across distributions ● Supports many VPN technologies – PSec, Cisco OpenConnect, Microsoft PPTP and OpenVPN.

  8. Installing and Updating Software ● A package in a Linux distribution provides one piece of the system, such as the Linux kernel , the C compiler, the shared software code for interacting with USB devices, or the Firefox web browser ● Packages are often dependent on other packages...

  9. Debian Package Management ● dpkg - can install, remove, and build packages but can not automatically download and satisfy all dependencies. ● apt ( A dvanced P ackage T ool) – a higher level package management system... generally tools are build upon it like apt-get , aptitude , synaptic , Ubuntu Software Center , Update Manager

  10. Red Hat Packet Manager

  11. openSUSE’s YaST Software Management

  12. Command Line Prompt ● Linux System Administrators spend their lives at a command line prompt (terminal emulator or virtual terminal) ● Advantages: – No GUI overhead. – Virtually every task can be accomplished using the command line. – You can script tasks and series of procedures. – You can log on remotely to networked machines anywhere on the Internet. – You can initiate graphical apps directly from the command line.

  13. Terminal Emulator ● A terminal emulator program emulates (simulates) a stand alone terminal within a window on the desktop gnome-terminal – xterm – konsole – Terminator – ● To launch your default terminal press Ctrl-Alt-T in Ubuntu

  14. The X Window System ● You can drop X Window graphical interface or start it up again, as you wish.. ● Ubuntu distinguishes between servers (without X ) and desktops (with X )

  15. Virtual Terminals ● VT s are console sessions that use the entire display and keyboard outside of a graphical environment ● “virtual” because although there can be multiple active terminals, only one terminal remains visible at a time.. ● One virtual terminal is reserved for the graphical environment – VT7 in Ubuntu and VT1 in CentOS/RHEL and openSUSE

  16. The Command Line ● Command name of the program you are executing – ls -a Desktop ● Options switches to modify what the command may do – Usually start with one or two dashes – ls -a Desktop ls --all Desktop ● Arguments Represent what the command operates on – ls -a Desktop

  17. Turning off GUI :) ● sudo service gdm stop – most GNOME desktops ● sudo service lightdm stop – Ubuntu ● sudo telinit 3 – RPM-based, like openSUSE or CentOS

  18. basic operations in the shell terminal

  19. Rebooting and Shutting Down ● halt , poweroff shutdown -h ● reboot shutdown -r ● shutdown -h 10:00 "shutting down for scheduled maintenance"

  20. Locating Applications

  21. Accessing Directories ● pwd displays present working directory ( echo $PWD also works) ● echo $HOME shows your home directory = default place where you end up after logging in. ● cd ~ or cd changes to your home directory ● cd .. changes to parent directory ● cd - changes to previous directory

  22. Absolute vs Relative Paths ● Absolute paths always start with / /home/konst/Desktop/hello.cpp /home////konst//Desktop/hello.cpp is also valid ... ● Relative pathname starts from the present working directory . present directory .. parent directory ~ your home directory ../../Desktop/hello.cpp

  23. Exploring filesystem ● cd / c hanges your current d irectory to root (/) ● ls l i s ts the content of the present working directory ● ls -a l i s ts all files including hidden ones (those whose name start with .) ● tree displays a tree view of the system (if the command is not present install it with sudo apt-get install tree )

  24. Hard and Soft (Symbolic) Links ● A symbolic link is a pseudo-file which behaves as an alternative name for some other file or directory ● The “contents” of the symlink are the real name pointed to ● When you try to use a file name including a symlink, the kernel replaces the symlink component with its ‘contents’ and starts again ● Symlinks allow you to keep a file (or directory) in one place, but pretend it lives in another

  25. Hard and Soft (Symbolic) Links ● Hard link is an alternative path to a file equally important as any other path ● Two files that have same inode number are hard links of each other – An inode is the data structure that describes a file on disk – It contains information about the file, including its type (file/directory/device), modification time, permissions, etc. – A directory entry contains a name and an inode number So a file’s name is not considered to be part of the file itself ●

  26. e.g. 2to3 is a symlink to 2to3-2.7 in /usr/bin

  27. Creating a symlink..

  28. Creating a hard link...

  29. References ● Linux System Administration: modules 1-6, 12 and 13 ● Linux Essentials: Chapters 3, 4 and 6

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend