Presentation is loading. Please wait.

Presentation is loading. Please wait.

Basic Commands ls cp ls –l (in detail format) echo ls –a

Similar presentations


Presentation on theme: "Basic Commands ls cp ls –l (in detail format) echo ls –a"— Presentation transcript:

1 Basic Commands ls cp ls –l (in detail format) echo ls –a
(all files including hidden files) whoami pwd who cd more touch init [1..6] grep ssh cat vi (Text Editor)

2 Network Administration
Module 0 : Linux – Basic Commands

3 Basic Commands (Cont…)
| (pipeline) env > (redirect) set >> (redirect append) info history hostname !n (execute history) uptime mkdir rm rmdir mv shutdown – h now shutdown –r now

4 Basic Commands (Cont…)
fdisk jobs su find su - ifconfig mount ifdown umount ifup uname –r man ln (hard link) man –k ln –s (soft Link)

5 Device files IDE hard drive – /dev/hda, /dev/hdb, …
Partition (IDE) – /dev/hda1, /dev/hda2 … SATA hard drive – /dev/sda, /dev/sdb, … Partition (SATA) – /dev/sda1, /dev/sda2, … CDROM - /dev/cdrom DVDROM - /dev/dvd Floppy Drive - /dev/fd0

6 Disk Management df mkswap du For file and directory mkfs fsck
option –k in 1-k block-size –m in 1-M block-size –h human readable mkswap du For file and directory mkfs fsck

7 User Management useradd usermod userdel
Option –r (remove all files in home directory) groupadd groupmod groupdel

8 User Management (Configuration files)
/etc/passwd student:x:501:501:Full Time:/home/student:/bin/bash /etc/shadow student1:!!:13571:0:99999:7::: student:$1$SaChG8Zj$vQuk0TSIgd:13560:0:99999:7::: /etc/group student:x:501:johnchan,jameswong username UID Group ID Home directory Default shell Password (not used) Description / GECOS username password Group Name Group ID Group members Group password (Not used)

9 Environment Variables
PS1 – PS4 PATH HOME SHELL USER Commands set env echo $XXXX Note: When you use shell variable, you need to $ before the name of the variable (e.g. $PATH) Environment variable e.g. PATH

10 File System File System supported by Linux
ext2 / ext3 (ext3 with journaling) FAT16 NTFS HPFS …. ISO9660 (CDROM)

11 Directory Layout / Structure
/dev /etc /etc/sysconfig /lib /bin and /sbin /mnt (or /media) /opt /proc /usr /usr/local /var /var/log /home /root You should understand/know which type of file is stored in these directories? any specific functions.

12 Important Files (configuration files)
/etc/fstab /etc/inittab /etc/crontab /etc/grub.conf /etc/hosts /etc/passwd /etc/group /etc/shadow ~/.bash_profile ~/.bash_logout /etc/bashrc ~/.bashrc You should understand/know What kind of information is stored in these configuration files? Functions of these configuration files (i.e. Which program/component is controlled by these configuration files).

13 Kernel Version Linux Kernel Version Meaning of kernel version
Different portion of kernel version Kernel Version.Major.Minor.Patch (e.g ) Distribution Example: Redhat, Mandrake, Debian, SuSe, Ubuntu, Knoppix, Fedora Core, CentOS … … What is distribution meant? What is System Administration / Duty of Administrator Administrator account - root You should know which command(s) can be used to complete a specific task e.g create a new user account – useradd command and passwd command

14 Home Directory & Run Level
Relative path and absolute path . Current directory .. Parent directory Home Directory : ~ Configuration Files Meaning of the content of some configuration files (e.g. passwd, group, shadow) Directory Layout Run Level 0, 1, 3, 5 and 6


Download ppt "Basic Commands ls cp ls –l (in detail format) echo ls –a"

Similar presentations


Ads by Google