Basic C L I

Post on 12-Jul-2015

1.240 views 2 download

Tags:

Transcript of Basic C L I

Basic CLI Session 2Session 2

By: Bahaa S. Salama (bahaa2008)

Why brother ?

Powerful

Easier to get help (Not descriptive)

Performance (Take less resources)

“ A child you use a computer by looking at the pictures. When he grow up, he learn to read and write.”

William Shotts, Jr

Shell and Terminal

Shell is a command-line interpretersh,ash,bash,csh,ksh,zsh,busybox

Terminal or terminal emulators is a emulator to real shell (console)xterm, konsole, gnome-terminal

Managing Files

List Files ls

Create file touch

Copy file cp

Move file mv

Delete file rm

Display file cat - less - more

ls

-l long listing

-d directories

-h human readable sizes

-a all files

-w wide listing

Managing Directories

List directories ls

Make directory mkdir

Change to directory cd

Copy directory cp

Move directory mv

Remove directory rmdir

Current directory pwd

Interesting commands

Date and Time date

Calender cal

Manuals man

Information info

Interesting CLI Tricks

Playing music and video

Chatting and Web

Displaying Images

Tweeting from CLI

And the list is still going ^_^

How to get help

Man pages

Info pages

Google

Forums

IRC

Community

Do u want more ?

Break

Working Multiple Files

Using the wild cards

* for multiple characters

? for single character

Using regex

To be covered later

Searching for Files

Using find

-name

-size

-type

-user

Redirection and Piping

put to file >

get from file <

append to file >>

pipe |

Note: more about redirecting of output in the bash sessions

Symbolic Links

What is links ?

Types of links

Soft links

Hard links

How to make a link ?

Linux Directories

/bin

/sbin

/home

/etc

/media

/tmp

/boot

/dev

/root

/usr/bin

/usr/sbin

/var/log

/var/cache

/lib

/opt

Know more about your pc

CPU cat /proc/cpuinf

Memory cat /proc/meminfo

PCI Cards lspci

USB Devices lsusb

Network interfaces ifconfig

Free memory free -m

Monitor Working processes top

Break

Permissions

Why Permissions ?

User,Group,Other

Read,Write,Execute

Permissions symbolically

r read u user

w write g group

x execute o other

Permissions - cont.

Permissions numerically

7 rwx 3 -wx

6 rw- 2 -w-

5 r-x 1 --x

4 r-- 0 ---

Change user chown

Change group chgrp

Change permissions chmod

References

Wikipedia

http://linuxzoo.net

http://grussell.org/ns/lectures.html

http://www.linuxawy.org/node/46

http://www.linuxawy.org/node/51

Questions

Thanks