rhel1
Post on 15-Jul-2015
35 Views
Preview:
TRANSCRIPT
In 1969, Four programmer Ken Thompson, Dennis Ritchie, Rudd Canady & Doug McElroy made a program in Bell labs which does not have any name in year 1969. Brian Kernighan checked that program & found it is very good software for client & networking purpose. He gave the name Unix to this program on 1st January 1970 (epoch time).
First Operating System. That time that program was written in Assembly language. In 1972, a programmer Dennis Ritchie started converting this program in C language. (Also called founder of C language). 1973- Unix in C language.
Paul Allen & Bill Gates are the employee of Bell Labs. In 1981, they both started Microsoft with 9 more candidates & they gave a programme named Xenix (1980) but it was flopped. In 1981- Launched MS-DOS 1.0 In 1984- UNIX open source
In 1985- First Graphical Based OS- Win 2.0 In 1991, Linus Benedict Torvalds, B-tech Iind year Computer Science, 23 years old student of University of Helensiki (Finland) made Kernel (25th August 1991). In 1994- Red Hat Company (collection of Linux Sets) came into existence. 96.8 % servers of Linux till 2009.
Everything is a file.
Small, single purpose programmes.
Ability to Chain programmes together to perform complex tasks.
Avoid captive user interfaces.
Configuration data stored in text.
CPUMin- Intel Pentium 4 2.0GHzRec- Intel Duel Core 2.0GHz
RAMMin- 512MB (Graphical) 384MB (CLI)Rec- 1GB
Hard Disk Min- 4.5GB, Rec- 10GB
4GB RAM – 2GB Swap 4-16GB RAM- 4GB Swap 16-64GB RAM- 8GB Swap
/ - Root Partition /boot – Boot Partition /swap - swap partition /home – Home Partition
/home - Users home (all users folders) /bin, /usr/bin - Commands (user executable & Scripts) /sbin, /usr/sbin - root privileged command /usr - User’s Configurations files /etc - System Configuration files /boot - Linux Kernel & Bootable files /root - root (Admin) Data /mnt - for mounting any external devices /media - for mounting CD/DVD drives /dev - devices (HDD, CD-ROM, Pen Drive) /var, - Log files /proc - Current running system Information /sys - System Hardware Files /lib - Library files stored – All commands /net - Accessing Network File system /misc - Files for Auto-Mounting /opt - Optional software /tmp - Temporary files /srv - Server Database
Post LILO (RHEL4) Boot Loader
GRUB (RHEL 5) Kernel (Vmlinuz) initrd (All device file information) init (Run Level)
Directory commands:
mkdir <Directory name> - For creating directory.
cd <Directory name> - change directory.
cd .. - to come out from working directory.
rmdir <Directory name> - to remove directory
File Commands:
touch <filename> - creates a blank file.
cat > filename - creates a file and for saving this file (ctrl + D)
cat - to see the content of the file.
cat file1 >> file2 - to move file1 matter in file2
cat -n filename - to see how many lines are written in that file.
Commands for deleting:
rm filename - deletes a file.
rm -i - deletes file/folder in interactive mode (asking mode)
Help Commands:
whatis <command>
man <command>
info <command>
<command> --help
which <command>
cd /usr/share/doc
These Commands are used as help commands.
Print all tags and summary of the asked command.
Copy:
cp <source> <destination> - copies files from source to destination
cp -i <source> <destination> - copies files from source to destination in asking
mode
cp -i * <destination> - copies current working directory all data to
destination.
cp -r <directory name> <destination> - copies directory from source to
destination
Rename & Move:
mv <oldfile> <newfile> (Rename)
mv <filename> <where we have to move the file> (Move)
Listing Commands: ls - listing files/folders
ls -l (ll) - long listing of files/folders with whole information
ls -a - lists all files/folders (hidden also)
ls ??? - all files/folders named with 3 characters
ls m* - files & directories started with letter m.
poweroff -f halt -n -p - We can turn off our system by these
commands init 0 init 6 - We can Restart our system by these
commands reboot
startx - Switch from command to graphic.
init 5 - Restart System graphically.
history - To see history of recent commands.
history -c - To clear the history of recent commands
bc - Starts basic calculator.
whoami or w - To know by which user we logged on
mkfs.vfat -I /dev/device id - To format device in fat format
look <word> - For looking the exact word spelling.
date mmddhhmmyy - To set date.
uname - To see kernel name.
uname –r - Kernel release.
uname –a - Whole information about kernel.
file <file/directory name> - To check whether it is file or folder.
cat > /etc/issue - To create logoff scripts.
cat > /etc/motd - To create logon scripts.
cal yyyy or mm yyyy - shows calendar of that month & year.
adduser <username> - To create user
passwd <username> - To give password to user.
userdel (-r) <username> - To delete user.
groupadd <name> - To add a group.
usermod -G <group> <user> - It will add user to group.
groupdel <name> - To delete group.
chage -E YYYY-MM-DD <user> - Set user expiration.
chage -l <username> - To see user detailed information.
chage -W 1 <username> - To set warning period for user.
usermod -L <username> - To lock a user account.
usermod -U <username> - To unlock a user account.
passwd -d <username> - To remove password for a user.
_ _ _ _ _ _ _ _ _ _ owner group filename
f/d User group others
r=4 (22) w=2 (21) x=1 (20)read write execute
For directory maximum permission = 777For files maximum permission = 666
Default permission for file = 644Default permission for directory = 755
To give user full permission chmod 777 filename
To see the internal permission umask (max per. - umask = default permission) umask 000 (full permission for all) umask 777 (deny for all)
To change the owner of files or directory- chown <username> file/directory name
To change group of files & directory- chgrp <groupname> file/directory name
Commands for setting permission on a single user:
setfacl -m u:<user>:rwx /ww
It will set the full user permission on ww directory.
getfacl <filename>
It will display full information about that file or directory.
Every user has its own UID (User Identification)
Every group has its own GID (Group Identification)
If UID matches (i.e. login user & owner) user permission is applicable.
If GID matches (i.e. login user & group) group permission is applicable.
If nothing matches other permission is applicable.
Files where UID & GID information saved:
/etc/passwd (UID)
/etc/shadow (UID in encrypted form)
/etc/group (GID)
/etc/gshadow (GID in encrypted form)
top related