New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Rhel1
1.
2. 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.
3. 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.
4. 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.
5. CPU
Min- Intel Pentium 4 2.0GHz
Rec- Intel Duel Core 2.0GHz
RAM
Min- 512MB (Graphical) 384MB (CLI)
Rec- 1GB
Hard Disk
Min- 4.5GB, Rec- 10GB
9. 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
10. 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.
11. Commands for deleting:
rm filename - deletes a file.
rm -i - deletes file/folder in interactive mode (asking mode)
12. 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.
13. 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
14. 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.
15. 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
16. 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.
17. 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.
18. _ _ _ _ _ _ _ _ _ _ owner group filename
f/d User group others
r=4 (22
) w=2 (21
) x=1 (20
)
read write execute
For directory maximum permission = 777
For files maximum permission = 666
Default permission for file = 644
Default permission for directory = 755
19. 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
20. 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.
21. Files where UID & GID information saved:
/etc/passwd (UID)
/etc/shadow (UID in encrypted form)
/etc/group (GID)
/etc/gshadow (GID in encrypted form)