RHCSA: Understand and use essential tools

  • Access a shell prompt and issue commands with correct syntax
    bash shell, case sensitivity, pwd, ls, cd
    fundamental stuff!
  • Use input-output redirection (>, >>, |, 2>, etc.)
    redirect to and from files: > < >> << 1> 2>
    pipe between commands: |
    prevent > overwriting an existing file: set –o noclobber
    cat – <<%
    text input
  • Use grep and regular expressions to analyze text
    grep “string” file.txt
    egrep “string1|string2” file.txt
  • Access remote systems using ssh
    ssh user@hostname
  • Log in and switch users in multiuser targets
    su, su – username, sudo
  • Archive, compress, unpack, and uncompress files using tar, star, gzip, and bzip2
    tar cvf xvf file.tar file.*
    (add z for gzip, Z for compress, j for bzip2)
    star -xattr -H=exustar -c -f=test.star file.*
    cpio –iv / -ov
  • Create and edit text files
    vim, touch
  • Create, delete, copy, and move files and directories
    rm mv touch cp mkdir rmdir
  • Create hard and soft links
    hard link (inodes point to same blocks): ln file newfile
    soft link (indirect pointer): ln –s file newfile
    directories have to be soft links
  • List, set, and change standard ugo/rwx permissions
    chmod 777 file, chmod a+rwx file
    7 is made from the sum of 4 (read) 2 (write) and 1 (execute)
    So 5 would be read + execute, 4 would be read only
    3 digits for User, Group, Other
  • Locate, read, and use system documentation including man, info, and files in /usr/share/doc
    man ps, whatis ps, apropos ps, info bash
    Install SElinux man pages: yum install -y selinux-policy-devel;mandb

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s