[ Terminal ] [ Users management ] Alt +F6 = Terminal switcher. useradd [option] JohnG

Similar documents
Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

Course 144 Supplementary Materials. UNIX Fundamentals

Commands are in black

Linux Essentials Objectives Topics:

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018

CSCM98 Lab Class #5 Getting familiar with the command line

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80

Presented by Bill Genske Gary Jackson

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories

Lab 2A> ADDING USERS in Linux

Linux Nuts and Bolts

Lab Working with Linux Command Line

5/8/2012. Creating and Changing Directories Chapter 7

Linux Kung Fu. Stephen James UBNetDef, Spring 2017

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Chapter-3. Introduction to Unix: Fundamental Commands

List of Linux Commands in an IPm

National University of Computer and Emerging Sciences Operating System Lab - 02 Lab Manual

Files

Linux Command Line Primer. By: Scott Marshall

Introduction of Linux

UNIX. Basic UNIX Command

Introduction. What is Linux? What is the difference between a client and a server?

Linux Systems Administration Getting Started with Linux

Computer Systems and Architecture

Linux Kung Fu. Ross Ventresca UBNetDef, Fall 2017

The kernel is the low-level software that manages hardware, multitasks programs, etc.

Introduction to the UNIX command line

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers

Please choose the best answer. More than one answer might be true, but choose the one that is best.

Unix Tools / Command Line

Basic Unix Command. It is used to see the manual of the various command. It helps in selecting the correct options

Linux Reference Card - Command Summary

Introduction to Unix: Fundamental Commands

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Computer Systems and Architecture

CST8207: GNU/Linux Operating Systems I Lab Seven Linux User and Group Management. Linux User and Group Management

CSCI 2132 Software Development. Lecture 4: Files and Directories

Introduction to the Linux Command Line

Introduction to Linux. Roman Cheplyaka

The Unix Shell. Pipes and Filters

Introduction to Linux

CST8207: GNU/Linux Operating Systems I Lab Seven Linux User and Group Management. Linux User and Group Management

The Directory Structure

Working With Unix. Scott A. Handley* September 15, *Adapted from UNIX introduction material created by Dr. Julian Catchen

Linux Shell Script. J. K. Mandal

Week 2 Lecture 3. Unix

CENG 334 Computer Networks. Laboratory I Linux Tutorial

LAB #7 Linux Tutorial

Unix File System. Class Meeting 2. * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech

commands exercises Linux System Administration and IP Services AfNOG 2015 Linux Commands # Notes

Unix Filesystem. January 26 th, 2004 Class Meeting 2

OPERATING SYSTEMS LINUX

Introduction to Linux

Introduction to Linux (Part I) BUPT/QMUL 2018/03/14

Chapter 5: User Management. Chapter 5 User Management

Defensie Exercises preparing for the exam.

Chapter 6. Linux File System

Introduction to Linux

Unix Introduction to UNIX

NETW 110 Lab 5 Creating and Assigning Users and Groups Page 1

Unix Handouts. Shantanu N Kulkarni

Operating Systems. Copyleft 2005, Binnur Kurt

Introduction to Linux

Name: Tej. D. Shah Subject:CC-304 Linux Uni. Practical programme College :L.J. College Of Computer Application. Questions:

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou

A Brief Introduction to Unix

User & Group Administration

Introduction to Linux

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2

UNIX COMMANDS AND SHELLS. UNIX Programming 2015 Fall by Euiseong Seo

Outline. Structure of a UNIX command

Unix System Architecture, File System, and Shell Commands

Linux at the Command Line Don Johnson of BU IS&T

On successful completion of the course, the students will be able to attain CO: Experiment linked. 2 to 4. 5 to 8. 9 to 12.

Introduction to Linux

Users Manual. OP5 System 2.4. OP5 AB. Page 1 of 6

File System Hierarchy Standard (FHS)

Multiple Choice - 58 Questions - 10 of 15%

Everything about Linux User- and Filemanagement

Linux Kung-Fu. James Droste UBNetDef Fall 2016

Some useful UNIX Commands written down by Razor for newbies to get a start in UNIX

CS/CIS 249 SP18 - Intro to Information Security

COSC UNIX. Textbook. Grading Scheme

Using Linux as a Virtual Machine

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

Files and Directories

Michael Wrzaczek Dept of Biosciences, Plant Biology Viikki Plant Science Centre (ViPS) University of Helsinki, Finland

h/w m/c Kernel shell Application s/w user

BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description:

Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p.

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

Embedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

System Programming. Introduction to Unix

Lab 2: Linux/Unix shell

SIEMENS UserAdmin Workshop TELEPERM XP Version 4 Chapter 1

Student Remote Login Procedure (see picture below): 1. Start SSH Secure Shell 2. Click the computer icon (4 th on the toolbar) 3.

Topics. Installation Basics of Using GNU/ Linux Administration Tools

Transcription:

[ Terminal ] Alt +F6 = Terminal switcher [ Users management ] useradd [option] JohnG -d : to assign homedirectory -u : to assign UID -s : to set shell -g : to assign group ID ex) Linux# useradd JohnG -d /home/user/johng Linux# useradd JohnG -u 1000 Linux# useradd JohnG -s /bin/tcsh Linux# useradd JohnG -g user (groups) Verifying Linux# useradd -D ; to show default value 1 / 12

WTServer3:~/Desktop # useradd -D GROUP=100 HOME=/home INACTIVE=-1 EXPIRE= SHELL=/bin/bash SKEL=/etc/skel GROUPS=video,dialout CREATE_MAIL_SPOOL=no To default value change Linux# useradd -D -g user200 ; to change group ID 200 Linux# useradd -D -d /home/user2 ; to change home directory as /home/user2 Linux# useradd -D -f 0 ; to set active status, if set 0, no more active after expired Linux# useradd -D -e 2009/12/20 ; to set experation day Linux# useradd -D -s /bin/tcsh ; to set shell for user. userdel [option] JohnG Linux# userdel -r JohnG; -r will allow delete home directory Passwd 2 / 12

Linux# passwd JohnG Verifying Linux# cat /etc/passwd man:x:13:62:manual pages viewer:/var/cache/man:/bin/bash news:x:9:13:news system:/etc/news:/bin/bash uucp:x:10:14:unix-to-unix CoPy system:/etc/uucp:/bin/bash JohnG:x:101:101:users:/home/user2:/bin/bash ** If you want to inactive user, put " * " in front of user name *JohnG:x:101:101:users:/home/user2:/bin/bash Identify Linux# whoami root Linux# who am i root pts Nov 20 15:54 (:1011.0) (192.168.1.5) 3 / 12

Linux# id uid=101(users) gid=101(users) groups=101(users) SU Linux# su JohnG ; Changes user account to JohnG Linux# su ; Changes to root in current directory Linux# su - ; Changes to root and moves to root directory. [ Group management ] groupadd user100 Linux# groupadd -g 100 user100 Verifying Check /etc/group Chris@Linux# groups 4 / 12

root users bin sys www dialout public video groupdel user100 Groups Chris@Linux# groups root users bin sys www dialout public video newgrp Chris@Linux# newgrp Hello Chris@Linux# groups Hello root users bin sys www dialout public video [ Directory ] pwd 5 / 12

Chris@Linux# pwd ; to see current directory, PWD stands for Present Working Directory) Chris@Linux# cd ; Change directory ex) Chris@Linux# cd /etc/httpd/ ; absolute path Chris@Linux# cd../../etc/httpd ; path from my directory Chris@Linux# cd or # cd ~ ; home directory Chris@Linux# cd.. ; To move one step up directory Chris@Linux# cd / ; To move top directory Chris@Linux# cd /user/chris ; To move Chris's home directory Chris@Linux# cd &HOME ; To move Chris's home directory Chris@Linux# cd ~ ; To move Chris's home directory ls man ls ; to see details ex) Chris@Linux# ls -l ; long(details) information Chris@Linux# ls -a ; to show filename started with ". ", such as hidden file Chris@Linux# ls -F ; to show characteristic of files Chris@Linux# ls -t ; to sort for latest updated files Chris@Linux# ls -al Chris@Linux# ls /bin ; to show file name only under directory /bin cat 6 / 12

Chris@Linux# cat > test ; create a new file as 'test', Ctl+D to exit Chris@Linux# cat file1 file2 file3 > file4 ; Combining file1, file2 and file3 to make file4 Chris@Linux# cat file1 >> file2 ; To attach file1 to file2 cp Chris@Linux# cp -i ; To confirm overwriting target file if file is exist on destination spot Chris@Linux# cp -f ; Force to overwrite Chris@Linux# cp -r ; To copy directory ex) Chris@Linux# cp.bashrc.bashrc.bak Chris@Linux# cp -f.bash. bashrc.bak ; Force to overwrite Chris@Linux# cp -r Hello/ Hello_Backup Chris@Linux# cp file_1 file_2 file_3./test find Chris@Linux# find / -name hello grep 7 / 12

Chris@Linux# grep HELLO *.doc ; To show all the line with HELLO string on files that has extension with doc. rm Chris@Linux# rm -i ; To confirm each file to delete, this option is default Chris@Linux# rm -f ; To delete without confirmation Chris@Linux# rm./hello/* ; To delete multiple files Chris@Linux# rm -r./hello ; To delete directory(test) Chris@Linux# rm -rf./hello ; To delete directory without confirmation mv ; (rename function included) Chris@Linux# mv file /tmp Chris@Linux# mv file_1 file_2 Chris@Linux# mv./test_1./test_2 mkdir Chris@Linux# mkdir./test Chris@Linux# mkdir -p./test_1/group1/users more / head / tail / less 8 / 12

Chris@Linux# more filename Chris@Linux# head filename ; To show front 10 line of the file Chris@Linux# tail filename ; To show tail 10 line of the file Chris@Linux# head - 100 filename ; To show front 100 lines of the file Chris@Linux# tail -100 filename ; To show tail 100 lines of the file Chris@Linux# less filename ; To scroll up and down rmdir Chris@Linux# rmdir./test Chris@Linux# rmdir -r /test Chris@Linux# rmdir -rf /test ; To delete directory without confirmation alias Chris@Linux# alias dir='ls -al' du Chris@Linux# du./chris ; To show number of files under /chris directory df 9 / 12

Chris@Linux# df ; To show disk usage by mount drive [ System ] shutdown CentOS5@Linux# shutdown -r 17:00 ; shut down now and reboot at 17:00. CentOS5@Linux# shutdown -h now ; halt system and shutdown right now. mount CentOS5@Linux# mount -t iso9660 /dev/cdrom -o ro /cdrom [ Version ] Redhat_Linux# uname -a ; To see version of Kernal Redhat_Linux# pppd -h ; To see version of PPP Redhat_Linux# ls -l/lib/libc.so.5 ; To see version of libc Redhat_Linux# ls -l /usr/lib/libg++.so ; To see version of libc++ Redhat_Linux# ld -v ; To see version of binutils Redhat_Linux# ldd -v and ldd -V ; To see version of ldd Redhat_Linux# ls -l /lib/libtermcap.so.* ; To see version of termcap Redhat_Linux# insmod -V ; To see version of modules Redhat_Linux# ps --version ; To see version of procps [ Service ] To start / stop / restart service CentOS_Linux$ cd /sbin 10 / 12

CentOS_Linux$./service https start / stop / restart To check all services CentOS_Linux$ cd /sbin CentOS_Linux$./service --status-all CentOS_Linux$./service --status-all grep httpd CentOS_Linux$./service --status-all less CentOS_Linux$./service httpd status To list of service and open port CentOS_Linux$ cd /sbin CentOS_Linux$ netstat -tulpn [ PHP ] To check current / running verison 11 / 12

CentOS_Linux$ php -v [ Yum ] To check what package installed on the server. CentOS_Linux$ yum list grep php ; in this example to see php related packages. 12 / 12