Training Linux - 1
Training Linux - 1
Linux Fundamentals
Hardware
Operating Systems
• Window
• OS X (MAC OS)
• IBM-AIX
• HP-UX
• Solaris
• Linux
+ RedHat, Ubuntu, fedora, Suse,
Debian, cent, etc…
Internet
Server
Why Linux
• Free
• Stability
• Secure
• Community Support
✓ CD/DVD
✓ Community
✓ Internet: Linux.org (official)
Linux Architecture
Question
What is different between Linux and Ubuntu?
Linux Mint
Linux OS
Linux kernel Fedora
• No terminal
• No GUI
• No app RedHat
• No driver
Linux Distribution
2/6/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 15
Linux Fundamentals
Create Linux Environment (DEMO
• Install Virtualbox/Vmware
• Download Linux OS (.iso)
• Create Linux Machine
Linux User
2/6/2023 27
09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use
Linux Fundamentals
Networking
Command Description
hostname List host name of the server
ping <ip> Availability of destination server over the network
wget Download packages/software into Linux system
ifconfig Lists IP address(es) of the server
telnet Connect to remote host/check port availability status
curl Access the application as from browser
2/6/2023 28
09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use
Linux Fundamentals
Port Numbers
Port Service
Number
21 FTP
22 SSH
23 TELNET
25 SMTP
53 DNS
80 HTTP
443 HTTPS
2/6/2023 29
09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use
Linux Fundamentals
Software Management
yum is the primary tool for getting, installing, deleting, querying and managing RetHat
Enterprise Linux RPM software packages from official RedHat software repositories, as well as
other third-party repositories
Commands:
▪ yum install <package name>
▪ yum remove <package name>
▪ yum update <package name>
▪ yum info <package name>
▪ yum list available
▪ yum list installed
EXTEND: apt
2/6/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 30
Linux Fundamentals
Services
service – This controls the starting and stopping of services
chkconfig – This controls which services are set to start on boot
• apt list
• ps –ef / ps –ef | grep “servicename”
#service <name of the service> status --- To check the status of the service
#service <name of the service> start --- To start the service
#service <name of the service> stop --- To stop the service
#service <name of the service> reload --- To reload the service
#service <name of the service> restart --- To restart the service
The above commands are useful for starting or stopping services during the
current session. To tell system to start services automatically at boot, you
must enable them
Command Description
ps –ef List the process which are running in the system
kill / kill -9 Kill a process or service
fg Run the program in the f
bg Run the service in the back group
top List top 20 process which are consuming more
CPU
2/6/2023 33
09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use
Linux Fundamentals
Networking
IP Address: An IP address can be thought of as being similar to a phone number. Just as every
person who communicates with a telephone is using a phone with a unique phone number,
every computer that is on the Internet has a unique IP address. Not only on internet but within
an organization every computer is assigned an IP address so that they can communicate with
each other.
Command Description
netstat Display all connected network
nslookup Query domain address
2/6/2023 35
09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use
Linux Fundamentals
Runlevels (discuss)
Looks at the /etc/inittab file to decide the Linux run level.
Following are the available run levels
• 0 – halt
• 1 – Single user mode
• 2 – Multiuser, without NFS
• 3 – Full multiuser mode
• 4 – Unused
• 5 – X11
• 6 – reboot
Command Description
gzip Create a compressed file
gunzip Unzip a file
2/6/2023 37
09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use
Linux Fundamentals
Crontab
In any operating system, it is possible to create jobs that you want to reoccur. This process known as
job scheduling, is usually done based on user-defind jobs. For RedHat or any other Linux, this process
is handled by the cron service or a daemon called crond, which can be used to schedule tasks
2/6/2023 38
09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use
Linux Fundamentals
Crontab Examples
minute | hour | day(month) | month | day(week) | CMD
Execute a job at 8:30 on everyday morning
30 8 * * * Command
Execute a job at 2:00 PM on every Saturday
00 14 * * 6 Command
Execute a job at 12:00 AM on 1st July
00 00 01 07 * Command
Execute a job at 3:30 PM on Every month 25th
30 15 25 * * Command
2/6/2023 39
09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use
Linux Fundamentals
DAY 1
SUMMARY
2/6/2023 40
09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use
Thank you