SlideShare a Scribd company logo
LINUX SYSTEM
                         ADMINISTRATION
                             In 10 Minutes




Monday, December 3, 12
DIRECTORIES


    •/                   “root” directory

    • /usr               directory of usr (sub directory of “/” root)

    • /usr/STRIM100                  STRIM100 is a subdirectory of /usr




Monday, December 3, 12
MOVING AROUND

    • pwd
       Show the “present working directory”

    • cd
       Change directory

    • cd       /usr/STRIM100

    • cd ..
       Move to the parent directory of the current directory

Monday, December 3, 12
LISTING FILES

    • ls
       List a directory

    • ls -l
       List a directory in a long format

    • ls /usr
       List the /usr directory


Monday, December 3, 12
CHANGING FILE PERMISSIONS

    • chmod  755 FILE
       Changes the file to be rw for the user and ro for group/world

    • chgrp user FILE
       Make the FILE belong to the group “user”

    • chown  cliff FILE
       Makes cliff the owner of FILE

    • chown  -R cliff DIR
       Makes cliff the owner of DIR and everything inside of it
Monday, December 3, 12
MOVING, RENAMING,
                             COPYING
    • cp file1 file2                  • rm
                                       file1
       Copy file1 to file2             Remove or delete file1

    • mv file1 newname               • rm -r dir1
       Move or rename a file          Recursively delete a
                                     directory and it’s contents
    • mv file1 ~/AAA/
       Move file1 to AAA directory   • mkdirdir1
                                     Create a directory



Monday, December 3, 12
VIEWING AND EDITING FILES

    • catfile                       • vifile
       Dump a file to the screen      Edit file with vi. Also try
                                     “nano”
    • more    file
       Dump a file to the screen    • head file
       line by line                  Show the first few lines of a
                                     file.
    • less file
       Like more but with paging   • tail
                                        file
                                     Show the last few lines


Monday, December 3, 12
INTERACTIVE HISTORY



    • You   can use the Up arrow key to access previous commands,
       edit and re-execute them.




Monday, December 3, 12
FILENAME COMPLETION



    • You  can use TAB to complete a partially typed command or
       filename

    • TAB          twice will show you all of your available options




Monday, December 3, 12
REDIRECTION

    • grep   string filename > newfile
       Redirects the output of the “grep” command into a new file
       called “newfile”

    • grep string filename >> newfile
       Appends the output of the “grep” command to the end of
       “newfile”

    • mysql  database < dump.sql
       Sends the commands from the SQL file into MySQL

Monday, December 3, 12
PIPES

    • The pipe symbol “|” is used to direct the output of one
       command into the input of another

    • ls  -l | more
       ls is now viewable line by line

    • du  -sc * | sort -n | tail
       Shows the largest files in the current directory


Monday, December 3, 12
SEARCHING FILES



    • grep   STRING FILENAME
       prints all the lines of a file that contain string. Wildcards can be
       used, along with the -r flag




Monday, December 3, 12
SEARCHING FOR FILES


    • find         search_path -name filename

    • find         . -name aaa.txt

    • find         / -name vimrc




Monday, December 3, 12
LOOKING FOR HELP


    • man
       Short for “Manual”

    • man          ls

    • man          grep



Monday, December 3, 12
PACKAGE MANAGEMENT


    • yum update
       Query all of the configured software sources for updates

    • yum          install PACKAGENAME

    • yum          search PACKAGE



Monday, December 3, 12
VIRTUAL BOX


    • virtualbox.org
       Free virtual machine host, run other operating systems inside a
       window on your own machine.

    • CentOS    - centos.org
       Worf runs CentOS 5. Free download and runs great in
       Virtualbox



Monday, December 3, 12

More Related Content

PPTX
Compression
PDF
DNS Server Configuration
PPTX
Dns server setup on ubuntu vps (master+slave)
PPTX
Linux commands
PDF
Module 02 Using Linux Command Shell
PPT
Linux commands
DOCX
Linux test paper2
PPTX
DNS Configuration
Compression
DNS Server Configuration
Dns server setup on ubuntu vps (master+slave)
Linux commands
Module 02 Using Linux Command Shell
Linux commands
Linux test paper2
DNS Configuration

What's hot (20)

ODP
Ubuntu For Intranet Services
PPTX
Basic command of hadoop
PDF
Course 102: Lecture 24: Archiving and Compression of Files
PDF
Quick Guide with Linux Command Line
PPT
Common linux ubuntu commands overview
PPTX
Ubuntu vps setup
PPT
Compression Commands in Linux
PDF
DNS server configurationDns server configuration
PPT
Sls01 Lecture02 Linux In Practice
PPTX
12 linux archiving tools
PPTX
PDF
Introduction to Linux, Pico, G++
PPSX
Linux: An Unbeaten Empire
PPTX
Samba power point presentation
PPT
Linux Administration
PPTX
Linux basics part 1
PPT
Linux presentation
PPTX
DNS server configuration
PPTX
DockerCon 18 docker storage
ODP
Linux commands
Ubuntu For Intranet Services
Basic command of hadoop
Course 102: Lecture 24: Archiving and Compression of Files
Quick Guide with Linux Command Line
Common linux ubuntu commands overview
Ubuntu vps setup
Compression Commands in Linux
DNS server configurationDns server configuration
Sls01 Lecture02 Linux In Practice
12 linux archiving tools
Introduction to Linux, Pico, G++
Linux: An Unbeaten Empire
Samba power point presentation
Linux Administration
Linux basics part 1
Linux presentation
DNS server configuration
DockerCon 18 docker storage
Linux commands
Ad

Similar to Linux Administration in 10 Minutes (20)

PPTX
Linux Fundamentals
ODP
Class 2
PPTX
various shell commands in unix operating system.pptx
PPTX
Directory Management in Unix
PPTX
Linux Commands all presentation file .pptx
PDF
Unix Basics Commands
DOCX
Directories description
PPT
101 3.3 perform basic file management
PPTX
Basic Linux Administration - 3.pptxon server
PPT
03 browsing the filesystem
DOCX
232623113-Basic-Linux-Commands.docx linux unix
PDF
A PHP Christmas Miracle - 3 Frameworks, 1 app
PDF
14_0930_Intro_to_Linux.pdf
PPTX
2. UNIX OS System Architecture easy.pptx
PDF
PDF
Linux Basics
PPT
Linuxnishustud
PDF
Unix primer
PPTX
Linuxtraining 130710022121-phpapp01
PPTX
Command for lab practice for information technology
Linux Fundamentals
Class 2
various shell commands in unix operating system.pptx
Directory Management in Unix
Linux Commands all presentation file .pptx
Unix Basics Commands
Directories description
101 3.3 perform basic file management
Basic Linux Administration - 3.pptxon server
03 browsing the filesystem
232623113-Basic-Linux-Commands.docx linux unix
A PHP Christmas Miracle - 3 Frameworks, 1 app
14_0930_Intro_to_Linux.pdf
2. UNIX OS System Architecture easy.pptx
Linux Basics
Linuxnishustud
Unix primer
Linuxtraining 130710022121-phpapp01
Command for lab practice for information technology
Ad

Linux Administration in 10 Minutes

  • 1. LINUX SYSTEM ADMINISTRATION In 10 Minutes Monday, December 3, 12
  • 2. DIRECTORIES •/ “root” directory • /usr directory of usr (sub directory of “/” root) • /usr/STRIM100 STRIM100 is a subdirectory of /usr Monday, December 3, 12
  • 3. MOVING AROUND • pwd Show the “present working directory” • cd Change directory • cd /usr/STRIM100 • cd .. Move to the parent directory of the current directory Monday, December 3, 12
  • 4. LISTING FILES • ls List a directory • ls -l List a directory in a long format • ls /usr List the /usr directory Monday, December 3, 12
  • 5. CHANGING FILE PERMISSIONS • chmod 755 FILE Changes the file to be rw for the user and ro for group/world • chgrp user FILE Make the FILE belong to the group “user” • chown cliff FILE Makes cliff the owner of FILE • chown -R cliff DIR Makes cliff the owner of DIR and everything inside of it Monday, December 3, 12
  • 6. MOVING, RENAMING, COPYING • cp file1 file2 • rm file1 Copy file1 to file2 Remove or delete file1 • mv file1 newname • rm -r dir1 Move or rename a file Recursively delete a directory and it’s contents • mv file1 ~/AAA/ Move file1 to AAA directory • mkdirdir1 Create a directory Monday, December 3, 12
  • 7. VIEWING AND EDITING FILES • catfile • vifile Dump a file to the screen Edit file with vi. Also try “nano” • more file Dump a file to the screen • head file line by line Show the first few lines of a file. • less file Like more but with paging • tail file Show the last few lines Monday, December 3, 12
  • 8. INTERACTIVE HISTORY • You can use the Up arrow key to access previous commands, edit and re-execute them. Monday, December 3, 12
  • 9. FILENAME COMPLETION • You can use TAB to complete a partially typed command or filename • TAB twice will show you all of your available options Monday, December 3, 12
  • 10. REDIRECTION • grep string filename > newfile Redirects the output of the “grep” command into a new file called “newfile” • grep string filename >> newfile Appends the output of the “grep” command to the end of “newfile” • mysql database < dump.sql Sends the commands from the SQL file into MySQL Monday, December 3, 12
  • 11. PIPES • The pipe symbol “|” is used to direct the output of one command into the input of another • ls -l | more ls is now viewable line by line • du -sc * | sort -n | tail Shows the largest files in the current directory Monday, December 3, 12
  • 12. SEARCHING FILES • grep STRING FILENAME prints all the lines of a file that contain string. Wildcards can be used, along with the -r flag Monday, December 3, 12
  • 13. SEARCHING FOR FILES • find search_path -name filename • find . -name aaa.txt • find / -name vimrc Monday, December 3, 12
  • 14. LOOKING FOR HELP • man Short for “Manual” • man ls • man grep Monday, December 3, 12
  • 15. PACKAGE MANAGEMENT • yum update Query all of the configured software sources for updates • yum install PACKAGENAME • yum search PACKAGE Monday, December 3, 12
  • 16. VIRTUAL BOX • virtualbox.org Free virtual machine host, run other operating systems inside a window on your own machine. • CentOS - centos.org Worf runs CentOS 5. Free download and runs great in Virtualbox Monday, December 3, 12