300 likes | 729 Views
Chapter 3. Linux Administration Part 1. Overview. This presentation covers : User Interface Administration Files System and Services Management. User Interface Administration. Log In Procedures . Users can log on to a Linux operating system using the Command-Line Interface (CLI).
E N D
Chapter 3 Linux Administration Part 1
Overview This presentation covers : • User Interface Administration • Files System and Services Management
Log In Procedures • Users can log on to a Linux operating system using the Command-Line Interface (CLI). • The Linux CLI provides the user with successive text only prompts to enter a user name and password. • No additional domain information is required.
GUI Interface • "X Window" allows Linux to operate similar to the other GUIs. • A typical X Window interface will look somewhat familiar to a Windows user. • Linux users can completely customize their X Window interface to meet their specific needs.
CLI Interface • The Linux command-line interface (CLI) allows the user to interact with the system in the same manner as the Windows command prompt. • Users should try entering basic commands. • Do not attempt to randomly guess commands, since such careless activity could have impacts on the system.
CLI Interface • The man command displays online manual pages for any of the hundreds of Linux commands. • A listing of all the Linux commands with a brief description of what they do can be obtained by entering man intro at the command line. • A man page can be displayed on the man command itself by typing man man.
CLI Interface • A number of different headings or informational areas are in a typical man page. • All commands will have at least a name, a synopsis, and a description. • A common Linux command is cd, which allows users to change directories.
CLI Interface • The ls command can be issued with the [options] and the [files] list to display the contents of a specific directory. • When the ls command is issued without these options the contents of the current directory will be listed. • Also more than one filename can be given so that the ls command will list the contents of multiple directories.
The Linux Shells • The Linux shells operate as a command interpreter. • The command interpreter from the MS-DOS environment is similar. • It combines the interactive features that make the C shell popular with the easier to use shell programming syntax of the Bourne shell. • The Born Again Shell is referred to as the bash shell and is used for many ’UNIX-like’ systems.
Files and Directoriesالملفات والمجلدات DIRECTORY Linux uses a hierarchical file system نظام الملفات المتدرج (الشجري) SUB-DIRECTORY1 SUB-DIRECTORY2 • Directories contain sub-directories • Directories and sub-directories hold files FILE FILE DATA DATA
Directory Hierarchy ROOT DIRECTORY / TMP BIN SBIN BOOT ROOT DEV ETC USR HOME PROC MOUNT Amal Muna Maha Nada Pictures Videos Downloads Books
Directory Hierarchy (Cont…) /tmp /root /usr /proc /var /bin /lib /sbin /dev /boot /etc /mnt /home ROOT
Creating/Sharing Directories • Creating files and directories in Linux is a matter of knowing the proper commands and how to use them. • Some of the commands use the same syntax for both files and directories, while others are different.
Using the Find and Grep Commands • The find command is used to locate one or more files assuming that you know their approximate filenames. • The find command lets you specify filters, and run commands on the contents of entire directory trees. • The grep command allows you to search for a pattern in a list of files. • The way to search for a string with the grep command is to put the words you are searching for together in single quotes.
Overview This presentation covers : • User Accounts and Group Accounts • Files System configuration files • Benefits of Networking • Daemons
User and Group Accounts in a Linux Environment • User accounts in a Linux system allow several people to be logged into the system at the same time or at different times without interfering with each other. • The term user and account are sometimes used interchangeably. • There are several important terms that will need to be learned.
User and Group Accounts in a Linux Environment • The Linux operating system is both a multiuser and multitasking system. • The most important user account is the Superuser account; also referred to as the root account. • This account is used by the system administrator to perform any administrative tasks on a Linux system. • The Superuser account can be used in several ways: • root login • Su • Sudo • SUID root files
Adding and Removing User Accounts • The root user creates other Linux users with the useraddcommand. • When this command is entered at the prompt, Linux performs many simultaneous tasks to create the user account, such as creating a home directory and assigning default permissions. • Flags and parameters exist for the useraddcommand and can be found by viewing its man page.
Creating a new user • Use the useraddcommand • Use the passwdcommand to set password • Try it… logon as root [root@penguinvm]# useradd amal [root@penguinvm]# passwd amal Changing password for user amal New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully [root@penguinvm]#
Managing User Accounts • The process of disabling an account requires a bit more effort. • The system administrator must edit the file that stores all user information on the system and manually disable the user's password. • User passwords are stored in a central file known as the ‘shadow’ file, which is located in the /etc directory. • This file can be edited with a text editor like vi Editor.
Creating Groups and Adding users to Groups • Every group on a Linux system can have anywhere from no members to as many members as there are user accounts on the systems. • Group membership is controlled by the /etc/group file. • To change to a different group after logging into the system use the newgrp command. • The syntax for this command is newgrp <group name> for example: newgrp engineering. • The gpasswd command can be used to modify existing groups.