SEF9 - 08 Tutorial 01 SESSION Basic Linux Environment (TUE 04 JUN 2013)

Linux and Unix are CASE-SENSITIVE ==> Capital letters (uppercase) are different from Small letters (lowercase).

wruslan@ibm-tutor-desktop:~$ date
Tue Jun 4 12:32:52 MYT 2013

===========================================================
wruslan@ibm-tutor-desktop:~$ uname -a
Linux ibm-tutor-desktop 2.6.32-122-rtai #rtai SMP Tue Jul 27 12:44:07 CDT 2010 i686 GNU/Linux

WHAT IT ALL MEANS FROM ABOVE.

uname = UNIX NAME command

Operating System = Linux
Machine or Hardware name = ibm-tutor-desktop
Operating System Version = 2.6.32-122-rtai #rtai
OS Processing System = SMP (Symmetric Multi Processor) ==> means can run MULTI-CORE CPU
Date OS Built = Tue Jul 27 12:44:07 CDT 2010
Hardware Architecture Type = i686 GNU/Linux

===========================================================
wruslan@ibm-tutor-desktop:~$ man uname
UNAME(1) User Commands UNAME(1)

NAME
uname - print system information

SYNOPSIS
uname [OPTION]...

DESCRIPTION
Print certain system information. With no OPTION, same as -s.

-a, --all
print all information, in the following order, except omit -p and -i if unknown:

-s, --kernel-name
print the kernel name

-n, --nodename
print the network node hostname

-r, --kernel-release
print the kernel release
....
....

wruslan@ibm-tutor-desktop:~$ man uname

Type to quit online help "man"

[1]+ Stopped man uname
wruslan@ibm-tutor-desktop:~$

===========================================================
wruslan@ibm-tutor-desktop:~$ uname -s
Linux
wruslan@ibm-tutor-desktop:~$ uname -r
2.6.32-122-rtai
wruslan@ibm-tutor-desktop:~$

wruslan@ibm-tutor-desktop:~$ uname -s
Linux
wruslan@ibm-tutor-desktop:~$ uname -r
2.6.32-122-rtai
wruslan@ibm-tutor-desktop:~$ uname -r -s
Linux 2.6.32-122-rtai
wruslan@ibm-tutor-desktop:~$ uname -rs
Linux 2.6.32-122-rtai
wruslan@ibm-tutor-desktop:~$

===========================================================







wruslan@ibm-tutor-desktop:~$ cd /
wruslan@ibm-tutor-desktop:/$ man cd
No manual entry for cd


===========================================================
wruslan@ibm-tutor-desktop:/$ ls
bin cdrom etc initrd.img lost+found mnt proc sbin srv tmp var
boot dev home lib media opt root selinux sys usr vmlinuz
wruslan@ibm-tutor-desktop:/$ ls -l
total 104
drwxr-xr-x 2 root root 4096 2013-04-09 15:54 bin
drwxr-xr-x 3 root root 4096 2013-04-09 16:04 boot
drwxr-xr-x 2 root root 4096 2013-04-08 08:35 cdrom
drwxr-xr-x 17 root root 4240 2013-06-04 12:06 dev
drwxr-xr-x 141 root root 12288 2013-06-04 12:11 etc
drwxr-xr-x 9 root root 4096 2013-05-15 11:43 home
lrwxrwxrwx 1 root root 31 2013-04-08 08:39 initrd.img -> boot/initrd.img-2.6.32-122-rtai
drwxr-xr-x 21 root root 12288 2013-04-15 11:19 lib
drwx------ 2 root root 16384 2013-04-08 08:31 lost+found
drwxr-xr-x 3 root root 4096 2013-04-23 15:48 media
drwxr-xr-x 2 root root 4096 2010-04-23 18:11 mnt
drwxr-xr-x 2 root root 4096 2010-04-29 20:17 opt
dr-xr-xr-x 162 root root 0 2013-06-04 19:56 proc
drwx------ 32 root root 4096 2013-06-04 12:05 root
drwxr-xr-x 2 root root 12288 2013-06-04 12:10 sbin
drwxr-xr-x 2 root root 4096 2009-12-06 05:55 selinux
drwxr-xr-x 3 root root 4096 2010-07-24 08:06 srv
drwxr-xr-x 12 root root 0 2013-06-04 19:56 sys
drwxrwxrwt 17 root root 4096 2013-06-04 12:40 tmp
drwxr-xr-x 12 root root 4096 2010-07-28 11:18 usr
drwxr-xr-x 14 root root 4096 2010-06-15 12:58 var
lrwxrwxrwx 1 root root 28 2013-04-08 08:39 vmlinuz -> boot/vmlinuz-2.6.32-122-rtai
wruslan@ibm-tutor-desktop:/$ ls -al
total 112
drwxr-xr-x 22 root root 4096 2013-04-08 08:39 .
drwxr-xr-x 22 root root 4096 2013-04-08 08:39 ..
drwxr-xr-x 2 root root 4096 2013-04-09 15:54 bin
drwxr-xr-x 3 root root 4096 2013-04-09 16:04 boot
drwxr-xr-x 2 root root 4096 2013-04-08 08:35 cdrom
drwxr-xr-x 17 root root 4240 2013-06-04 12:06 dev
drwxr-xr-x 141 root root 12288 2013-06-04 12:11 etc
drwxr-xr-x 9 root root 4096 2013-05-15 11:43 home
lrwxrwxrwx 1 root root 31 2013-04-08 08:39 initrd.img -> boot/initrd.img-2.6.32-122-rtai
drwxr-xr-x 21 root root 12288 2013-04-15 11:19 lib
drwx------ 2 root root 16384 2013-04-08 08:31 lost+found
drwxr-xr-x 3 root root 4096 2013-04-23 15:48 media
drwxr-xr-x 2 root root 4096 2010-04-23 18:11 mnt
drwxr-xr-x 2 root root 4096 2010-04-29 20:17 opt
dr-xr-xr-x 162 root root 0 2013-06-04 19:56 proc
drwx------ 32 root root 4096 2013-06-04 12:05 root
drwxr-xr-x 2 root root 12288 2013-06-04 12:10 sbin
drwxr-xr-x 2 root root 4096 2009-12-06 05:55 selinux
drwxr-xr-x 3 root root 4096 2010-07-24 08:06 srv
drwxr-xr-x 12 root root 0 2013-06-04 19:56 sys
drwxrwxrwt 17 root root 4096 2013-06-04 12:45 tmp
drwxr-xr-x 12 root root 4096 2010-07-28 11:18 usr
drwxr-xr-x 14 root root 4096 2010-06-15 12:58 var
lrwxrwxrwx 1 root root 28 2013-04-08 08:39 vmlinuz -> boot/vmlinuz-2.6.32-122-rtai
wruslan@ibm-tutor-desktop:/$

MEMORY TEST (IMPORTANCE OF CORRECTLY RUNNING RAM MEMORY)
===========================================================

Error-correcting code memory (ECC memory) is a type of computer data storage that can detect and correct the more common kinds of internal data corruption. ECC memory is used in most computers where data corruption cannot be tolerated under any circumstances, such as for scientific or financial computing.

ECC memory maintains a memory system immune to single-bit errors: the data that is read from each word is always the same as the data that had been written to it, even if a single bit actually stored, or more in some cases, has been flipped to the wrong state. Some non-ECC memory with parity support allows errors to be detected, but not corrected; otherwise errors are not detected.


Generic DDR-266 memory in the 184-pin DIMM form
Corsair DDR-400 memory with heat spreaders

Double data rate synchronous dynamic random-access memory (DDR SDRAM) is a class of memory integrated circuits used in computers. DDR SDRAM (sometimes referred to as DDR1 SDRAM) has been superseded by DDR2 SDRAM and DDR3 SDRAM, neither of which is either forward or backward compatible with DDR SDRAM, meaning that DDR2 or DDR3 memory modules will not work in DDR-equipped motherboards, and vice versa.

A DIMM or dual in-line memory module comprises a series of dynamic random-access memory integrated circuits. These modules are mounted on a printed circuit board and designed for use in personal computers, workstations and servers. DIMMs began to replace SIMMs (single in-line memory modules) as the predominant type of memory module as Intel P5-based Pentium processors began to gain market share.

A Non-Volatile DIMM (NVDIMM), is a computer memory DRAM DIMM module that retains data even when electrical power is removed either from an unexpected power loss, system crash or from a normal system shutdown. NVDIMMs are primarily used to improve application performance,[1] data security, system crash recovery time and to enhance SSD endurance

UNIX OPERATING SYSTEM (If you know LINUX you know 99% of UNIX)
==========================================================

LINUX - an operating system that runs on many different hardware.

All of the operating systems below are UNIXes

IBM-AIX on IBM hardware only.

HP-UX on Hewlett Packard hardware only.

SUN-SOLARIS on Sun Microsystems hardware only.

SGI-IRIX on Silicon Graphics hardware only.


===========================================================


Filesystem Hierarchy Standard (FHS) ==> DIRECTORY AND FILE STRUCTURE
=============================================================
The Filesystem Hierarchy Standard (FHS) defines the directory structure and directory contents in Linux operating systems. For the most part, it is a formalization and extension of the traditional BSD filesystem hierarchy.


C:\ For windows (Backward slash) is not CASE-SENSITIVE. (Uppercase and lower case is the same.)

/ For Linux (Forward slash) is very CASE-SENSITIVE. (Uppercase and lower case is NOT the same.)




wruslan@ibm-tutor-desktop:~$ pwd (MEANS PRESENT WORKING DIRECTORY)
/home/wruslan
wruslan@ibm-tutor-desktop:~$ cd /

wruslan@ibm-tutor-desktop:~$ cd /

NAME
ls - list directory contents

==================================================
wruslan@ibm-tutor-desktop:/$ ls
bin cdrom etc initrd.img lost+found mnt proc sbin srv tmp var
boot dev home lib media opt root selinux sys usr vmlinuz


-l use a long listing format
==============================================
wruslan@ibm-tutor-desktop:/$ ls -l
total 104
drwxr-xr-x 2 root root 4096 2013-04-09 15:54 bin
drwxr-xr-x 3 root root 4096 2013-04-09 16:04 boot
drwxr-xr-x 2 root root 4096 2013-04-08 08:35 cdrom
drwxr-xr-x 17 root root 4200 2013-06-04 16:16 dev
drwxr-xr-x 141 root root 12288 2013-06-04 16:16 etc
drwxr-xr-x 11 root root 4096 2013-06-04 16:12 home
lrwxrwxrwx 1 root root 31 2013-04-08 08:39 initrd.img -> boot/initrd.img-2.6.32-122-rtai
drwxr-xr-x 21 root root 12288 2013-04-15 11:19 lib
drwx------ 2 root root 16384 2013-04-08 08:31 lost+found
drwxr-xr-x 3 root root 4096 2013-06-04 16:10 media
drwxr-xr-x 2 root root 4096 2010-04-23 18:11 mnt
drwxr-xr-x 2 root root 4096 2010-04-29 20:17 opt
dr-xr-xr-x 164 root root 0 2013-06-05 00:16 proc
drwx------ 32 root root 4096 2013-06-04 16:15 root
drwxr-xr-x 2 root root 12288 2013-06-04 12:10 sbin
drwxr-xr-x 2 root root 4096 2009-12-06 05:55 selinux
drwxr-xr-x 3 root root 4096 2010-07-24 08:06 srv
drwxr-xr-x 12 root root 0 2013-06-05 00:16 sys
drwxrwxrwt 13 root root 4096 2013-06-04 17:28 tmp
drwxr-xr-x 12 root root 4096 2010-07-28 11:18 usr
drwxr-xr-x 14 root root 4096 2010-06-15 12:58 var
lrwxrwxrwx 1 root root 28 2013-04-08 08:39 vmlinuz -> boot/vmlinuz-2.6.32-122-rtai
wruslan@ibm-tutor-desktop:/$

-a, --all
do not ignore entries starting with .

A dot (.) in front of a filename is a HIDDEN FILE.

========================================================
wruslan@ibm-tutor-desktop:/$ ls -al
total 112
drwxr-xr-x 22 root root 4096 2013-04-08 08:39 .
drwxr-xr-x 22 root root 4096 2013-04-08 08:39 ..
drwxr-xr-x 2 root root 4096 2013-04-09 15:54 bin
drwxr-xr-x 3 root root 4096 2013-04-09 16:04 boot
drwxr-xr-x 2 root root 4096 2013-04-08 08:35 cdrom
drwxr-xr-x 17 root root 4200 2013-06-04 16:16 dev
drwxr-xr-x 141 root root 12288 2013-06-04 16:16 etc
drwxr-xr-x 11 root root 4096 2013-06-04 16:12 home
lrwxrwxrwx 1 root root 31 2013-04-08 08:39 initrd.img -> boot/initrd.img-2.6.32-122-rtai
drwxr-xr-x 21 root root 12288 2013-04-15 11:19 lib
drwx------ 2 root root 16384 2013-04-08 08:31 lost+found
drwxr-xr-x 3 root root 4096 2013-06-04 16:10 media
drwxr-xr-x 2 root root 4096 2010-04-23 18:11 mnt
drwxr-xr-x 2 root root 4096 2010-04-29 20:17 opt
dr-xr-xr-x 167 root root 0 2013-06-05 00:16 proc
drwx------ 32 root root 4096 2013-06-04 16:15 root
drwxr-xr-x 2 root root 12288 2013-06-04 12:10 sbin
drwxr-xr-x 2 root root 4096 2009-12-06 05:55 selinux
drwxr-xr-x 3 root root 4096 2010-07-24 08:06 srv
drwxr-xr-x 12 root root 0 2013-06-05 00:16 sys
drwxrwxrwt 13 root root 4096 2013-06-04 17:44 tmp
drwxr-xr-x 12 root root 4096 2010-07-28 11:18 usr
drwxr-xr-x 14 root root 4096 2010-06-15 12:58 var
lrwxrwxrwx 1 root root 28 2013-04-08 08:39 vmlinuz -> boot/vmlinuz-2.6.32-122-rtai
wruslan@ibm-tutor-desktop:/$



drwxr-xr-x 2 root root 4096 2013-04-09 15:54 bin

d = directory

rwxr-xr-x = (rwx)(r-x)(r-x) = (owner)(group)(rest of the world)

==> (owner) gets read, write and execute (rwx)
==> (group) gets read and execute (r-x)
==> (rest of the world) gets read and execute (r-x)

AS A USER, you should be concerned with your home directory only.
=======================================================
wruslan@ibm-tutor-desktop:/$ cd /home
wruslan@ibm-tutor-desktop:/home$ ls -l
total 36
drwxr-xr-x 2 arif arif 4096 2013-04-08 12:28 arif
drwxr-xr-x 2 azneeyaiti azneeyaiti 4096 2013-05-15 11:43 azneeyaiti
drwxr-xr-x 2 haniyusri haniyusri 4096 2013-05-15 11:39 haniyusri
drwxr-xr-x 28 ibm-tutor ibm-tutor 4096 2013-04-09 11:40 ibm-tutor
drwxr-xr-x 2 iskandar iskandar 4096 2013-05-15 11:34 iskandar
drwxr-xr-x 3 root root 4096 2013-05-15 11:25 samba_shares
drwxr-xr-x 36 wruslan wruslan 4096 2013-06-04 17:52 wruslan
drwxr-xr-x 23 wruslan1 wruslan1 4096 2013-06-04 13:18 wruslan1
drwxr-xr-x 2 wruslan2 wruslan2 4096 2013-06-04 16:12 wruslan2
wruslan@ibm-tutor-desktop:/home$

When you use NAUTILUS as your GUI File Browser, make sure you usr LIST VIEW not ICON VIEW (useless).


===========================================================
wruslan@ibm-tutor-desktop:/home$ cd wruslan
wruslan@ibm-tutor-desktop:~$ ls -l
total 128
-rw-r--r-- 1 wruslan wruslan 39889 2013-04-16 17:00 dead.letter
drwxr-xr-x 2 wruslan wruslan 4096 2013-04-23 15:48 Desktop
drwxr-xr-x 2 wruslan wruslan 4096 2013-04-09 17:56 Documents
drwxr-xr-x 9 wruslan wruslan 4096 2013-04-30 18:15 Downloads
drwxr-xr-x 2 wruslan wruslan 4096 2013-04-09 15:28 Music
drwxr-xr-x 2 wruslan wruslan 4096 2013-04-09 15:28 Pictures
drwxr-xr-x 2 wruslan wruslan 4096 2013-04-09 15:28 Public
drwxr-xr-x 2 wruslan wruslan 4096 2013-06-04 17:57 sef9-hai
-rw-r--r-- 1 wruslan wruslan 12773 2013-06-04 17:54 session-sef9TA-2013-06-04.txt
-rw-r--r-- 1 wruslan wruslan 535 2013-06-04 16:28 session-sef9-tutorial-01-2013-06-04.txt
-rw-r--r-- 1 wruslan wruslan 8441 2013-04-09 16:32 Software-Design.txt
drwxr-xr-x 2 wruslan wruslan 4096 2013-04-09 15:28 Templates
-rw-r--r-- 1 wruslan wruslan 163 2013-04-29 11:17 test2.csv
-rw-r--r-- 1 wruslan wruslan 189 2013-04-09 16:22 text100.txt
drwxr-xr-x 2 wruslan wruslan 4096 2013-04-09 17:58 uml-generated-code
drwxr-xr-x 2 wruslan wruslan 4096 2013-04-09 15:28 Videos
-rw-r--r-- 1 wruslan wruslan 2966 2013-04-09 17:35 WRY-mc146818rtc.h
-rw-r--r-- 1 wruslan wruslan 299 2013-04-09 17:33 WRY-time.h

wruslan@ibm-tutor-desktop:~$ cd sef9-hai/
wruslan@ibm-tutor-desktop:~/sef9-hai$ ls -l
total 4
-rw-r--r-- 1 wruslan wruslan 44 2013-06-04 17:57 test1.txt

wruslan@ibm-tutor-desktop:~/sef9-hai$ nano test1.txt
wruslan@ibm-tutor-desktop:~/sef9-hai$ ls -l
total 4
-rw-r--r-- 1 wruslan wruslan 64 2013-06-04 17:59 test1.txt
wruslan@ibm-tutor-desktop:~/sef9-hai$

Can you see the different times and sizes of the file test1.txt above?

44 bytes versus 64 bytes.

================================================================

--
WASSALAM
wruslan.hahaha

Microsoft Word Version
Return to Software Engineering Fundamentals (SEF9MMUWRY)
Previous Topic: 07 Weblink downloads SEF9 Resources (slides + tutorials + labs) from MMLS
Next Topic: 09 SWEBOK + SDLC(Waterfall) + System Requirements + Software Requirements

0 comments:

Post a Comment