0% found this document useful (0 votes)
22 views

28 Common Linux DEV Community

Devops practices

Uploaded by

englinux200
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

28 Common Linux DEV Community

Devops practices

Uploaded by

englinux200
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

1/8/25, 10:58 PM 28 Common Linux 🐧Questions And Answers 🖥️ - DEV Community

Zoo Codes
Posted on Nov 21, 2024

🐧Questions And Answers 🖥️


2

28 Common Linux
#linux #learning #productivity #tutorial
👋 Kindness is contagious
Introduction
Immerse yourself in a wealth of knowledge with this piece, supported by the
Welcome
inclusive to
DEVtheCommunity—every
friendly world of Linux! If you’re curious
developer, about
no matter how they
where this powerful
are in their
operating
journey, issystem
invitedworks, you’ve come
to contribute to ourtocollective
the right place.
wisdom.This article is packed with
common questions and easy-to-understand answers that will help you get started with
A simple “thank you” goes a long way—express your gratitude below in the
Linux.
comments!
Whether you’re a complete beginner or just looking to brush up on your skills, we’ve got
you covered.insights
Gathering From theenriches
basics toour
everyday
journey commands, this guide
on DEV and willour
fortifies walk you through
community
everything youfind
ties. Did you needthistoarticle
know to feel comfortable
valuable? Taking ausing Linux.
moment to Let’s
thankembark on this
the author
exciting
can have journey together!
a significant impact.

Common
Okay Linux Questions & Answers

https://dev.to/ken_mwaura1/linux-answers-pbb 1/13
1/8/25, 10:58 PM 28 Common Linux 🐧Questions And Answers 🖥️ - DEV Community
1. What are the primary purposes and key features of an operating system,
particularly Linux? The primary purpose of an operating system (OS) like Linux is to
manage hardware resources and provide a user interface for interaction. Key features
of Linux include multitasking, multi-user capabilities, security through user permissions,
and a powerful command-line interface. Additionally, Linux is open-source, which allows
for customization and community-driven development.

2. Describe the origins and development of the Linux operating system. Linux was
created by Linus Torvalds in 1991 as a free and open-source alternative to UNIX. It
started as a personal project but quickly gained popularity among developers and
enthusiasts. Over the years, many distributions (distros) have been developed, each
tailored for different needs, such as Ubuntu for ease of use and Fedora for cutting-edge
features. The collaborative nature of its development has led to a robust and secure
operating system.

3. What are the best practices for installing Fedora Linux? When installing Fedora,
I've found that it's important to back up any important data, ensure that your hardware is
compatible, and create a bootable USB drive with the Fedora ISO. During installation, I
recommend choosing the custom partitioning option if you're familiar with disk
management, and to keep the system updated regularly using the package manager to
avoid security vulnerabilities.

👋
4. Explain how
Kindness is to interact with a Linux system using a terminal and basic shell
contagious
commands. Interacting with Linux through the terminal is a powerful way to perform
Immerse
tasks. yourself
Basic in a wealthinclude
shell commands of knowledge
ls to list with
files, this piece,
cd to supported
change by the
directories, cp to copy
inclusive
files, DEV
and rm Community—every
to remove developer,
files. Using the no matter
man command (e.g.,where they
man ls) canare in their
provide
journey,information
detailed is invited toabout
contribute to our collective
any command, which iswisdom.
incredibly helpful for learning.

A Describe
5. simple “thank you” goes
the purpose ofaTCP/IP
long way—express
protocol andyour
how gratitude below ininthe
it is configured Linux.
comments!
TCP/IP is the fundamental protocol suite for networking, allowing different devices to
communicate over the internet. In Linux, you can configure TCP/IP settings through
Gathering insights
configuration files like enriches our journey on DEV and fortifies our community
/etc/sysconfig/network-scripts/ifcfg-eth0 for static IP
ties. Did you
addresses find the
or use thisnmcli
articlecommand
valuable?for
Taking a moment
managing to thank
network the author
connections via
can have a significant impact.
NetworkManager.

6. How
Okay do you configure a network interface card (NIC) in Linux? To configure a
NIC in Linux, I usually edit the network configuration files or use the ip command. For
example, I can set a static IP by editing /etc/network/interfaces or using nmcli for
https://dev.to/ken_mwaura1/linux-answers-pbb 2/13
1/8/25, 10:58 PM 28 Common Linux 🐧Questions And Answers 🖥️ - DEV Community
NetworkManager-managed connections. After making changes, I restart the networking
service using systemctl restart NetworkManager.

7. What are the key aspects of printer, log file, and user administration in
Linux? Printer administration involves configuring printers using CUPS (Common Unix
Printing System), where you can add, manage, and troubleshoot printers through a web
interface. Log file management is crucial for system monitoring; log files located in
/var/log/ provide insights into system performance and errors. User administration
includes adding/removing users with commands like useradd and userdel , and
managing permissions with chmod and chown .

8. How do you navigate the Linux directory structure using relative and absolute
pathnames? Navigating the Linux directory structure can be done using both relative
and absolute pathnames. An absolute pathname starts from the root directory (e.g.,
/home/user/documents ), while a relative pathname starts from the current directory
(e.g., documents if I’m already in /home/user ). Using cd to change directories and pwd
to print the current directory helps me keep track of where I am.

9. Explain the use of shell wildcards in specifying filenames in Linux. Shell


wildcards are incredibly useful for matching filenames. For example, * matches any
number of characters (e.g., *.txt matches all text files), while ? matches a single
character (e.g., file?.txt matches file1.txt, file2.txt, etc.). Using wildcards saves time
👋
when working
Kindness with multiple files.
is contagious

10. Describe
Immerse the major
yourself features
in a wealth of the BASH
of knowledge shell,
with this including redirection
piece, supported and
by the
piping. Redirection
inclusive allows me to send
DEV Community—every output from
developer, noamatter
command to athey
where file using
are in>their
(e.g., ls
>journey,
filelist.txt ) or to
is invited read input from
contribute a filecollective
to our using <. Piping
wisdom.(|) lets me chain commands
together, so I can use the output of one command as the input for another (e.g., ls |
A simple
grep “thank
txt to you”
list only goes
text a long way—express your gratitude below in the
files).
comments!
11. How do you create and execute basic shell scripts in Linux? Creating a shell
Gathering
script insights enriches
is straightforward. I usuallyour journey
start on DEV
by opening and
a text fortifies
editor (like our
nanocommunity
or vim ), then I
write
ties. my
Didscript starting
you find with the
this article shebang Taking
valuable? line #!/bin/bash
a moment to to specify theauthor
thank the interpreter.
After writing
can have a the commands
significant I want to execute, I save the file with a .sh extension. To
impact.
execute the script, I need to make it executable using chmod +x script.sh , and then I
canOkay
run it with ./script.sh .

https://dev.to/ken_mwaura1/linux-answers-pbb 3/13
1/8/25, 10:58 PM 28 Common Linux 🐧Questions And Answers 🖥️ - DEV Community
12. What are the types of hardware typically found in server systems and how are
they configured in Linux? Server systems typically include components like CPUs,
RAM, storage drives (HDDs/SSDs), network interface cards (NICs), and sometimes
specialized hardware like RAID controllers. In Linux, hardware configuration can be
done through various commands like lspci to list PCI devices, lsblk to view block
devices, and configuring storage through tools like fdisk or parted . Additionally, server
settings can be managed through configuration files and system utilities.

13. Explain the RAID levels and their configurations in Linux. RAID (Redundant
Array of Independent Disks) levels include RAID 0 (striping, no redundancy), RAID 1
(mirroring, redundancy), RAID 5 (striping with parity), and RAID 10 (combination of
striping and mirroring). In Linux, I can configure RAID using the mdadm tool, which
allows me to create and manage software RAID arrays. For example, to create a RAID
1 array, I'd use a command like mdadm --create /dev/md0 --level=1 --raid-devices=2
/dev/sda /dev/sdb.

14. Summarize the major steps necessary to boot a Linux system. Booting a Linux
system generally involves several key steps:

BIOS/UEFI Initialization: The system firmware initializes hardware and performs a


POST (Power-On Self-Test).
Bootloader Execution: The bootloader (like GRUB) is loaded from the boot sector,
👋 which
Kindnessthen presents options for booting different kernels or operating systems.
is contagious
Kernel Loading: The selected kernel is loaded into memory, and the initial RAM disk
Immerse yourself
(initrd) is in a wealth
also loaded of knowledge with this piece, supported by the
if necessary.
inclusive
SystemDEV Community—every
Initialization: developer,
The kernel initializes no matter
system where
hardware andthey are the
mounts in their
root
journey, is invited to contribute to our collective wisdom.
filesystem.
Init System: The init system (like systemd) is started, which then launches system
A simple “thank you” goes a long way—express your gratitude below in the
services and user sessions.
comments!
15.How do you configure the system to start and stop daemons at certain run
Gathering insights enriches our journey on DEV and fortifies our community
levels or targets? In Linux, particularly with systemd, services (or daemons) are
ties. Did you
managed find units.
through this article valuable?
To enable Taking
a service a moment
to start at boot,toI can
thank thesystemctl
use author enable
can have a significant impact.
service_name , and to disable it, systemctl disable service_name . To start or stop a
service manually, I can use systemctl start service_name or systemctl stop
Okay . For configuring specific targets, I can use systemctl isolate
service_name
target_name to switch to a specific run level or target.

https://dev.to/ken_mwaura1/linux-answers-pbb 4/13
1/8/25, 10:58 PM 28 Common Linux 🐧Questions And Answers 🖥️ - DEV Community
16.What is the Filesystem Hierarchy Standard in Linux? The Filesystem Hierarchy
Standard (FHS) defines the directory structure and directory contents in Linux systems.
It specifies that:

[ ] the root directory (/) is the top-level directory.


[ ] /bin for essential binaries,
[ ] /etc for configuration files,
[ ] /home for user home directories,
[ ] /var for variable data,
[ ] /usr for user programs and data.

This standardization helps ensure consistency across different Linux distributions.

17.Explain how to manage file and directory permissions in Linux. In Linux, file
and directory permissions are managed using the chmod , chown , and chgrp
commands. Permissions are represented in three categories: owner, group, and others,
with read (r), write (w), and execute (x) permissions. For example, to give the owner
read and write permissions, I would use chmod u+rw filename . To change the owner of
a file, I would use chown new_owner filename , and to change the group, chgrp
new_group filename .

18.Describe the types of device files in the /dev directory. In the /dev directory,

👋
there are two main types of device files: character device files and block device files.
Kindness is contagious
Character device files represent devices that transmit data one character at a time (e.g.,
Immerse for
/dev/tty terminal
yourself in adevices),
wealth ofwhile block device
knowledge filespiece,
with this represent devicesby
supported that
theread and
write data DEV
inclusive in blocks (e.g., /dev/sda for
Community—every hard drives).
developer, These files
no matter whereallow applications
they are in theirto
interact
journey,with hardware
is invited devices through
to contribute to our standard
collectivefile operations.
wisdom.

19.How
A simpledo you mount
“thank andaunmount
you” goes filesystemsyour
long way—express in Linux? To below
gratitude mount in
a filesystem
the in
Linux, I typically use the mount command. For example, to mount a USB drive located
comments!
at /dev/sdb1 to a directory called /mnt/usb, I would run:
Gathering insights enriches our journey on DEV and fortifies our community
sudo Did
ties. mount
you/dev/sdb1 /mnt/usb
find this article valuable? Taking a moment to thank the author
can have a significant impact.
To unmount it, I would use the umount command:

Okay
sudo umount /mnt/usb

https://dev.to/ken_mwaura1/linux-answers-pbb 5/13
1/8/25, 10:58 PM 28 Common Linux 🐧Questions And Answers 🖥️ - DEV Community
It’s important to ensure that no processes are using the filesystem before unmounting it
to avoid data loss.

20.How do you view processes and change their priorities in Linux? To view
processes in Linux, I often use the ps command, which lists currently running
processes. For a more dynamic view, top or htop provides real-time updates. To
change a process's priority, I can use the nice command when starting a process
(e.g., nice -n 10 command ) or the renice command to change the priority of an already
running process. Lowering the priority (increasing the niceness value) can be done with:

renice 10 -p PID

21.Explain the use of cron and at daemons for scheduling tasks in


Linux. The cron daemon is used for scheduling recurring tasks at specified intervals. I
can create a cron job by editing the crontab with crontab -e , where I specify the time
and command to run. For example, to run a script every day at 5 AM, I'd add:

1 0 5 * * * /path/to/script.sh

The at command is used for scheduling one-time tasks. I can schedule a command to
run at a specific time by using:

👋echoKindness
"command" | at 5 PM
is contagious

Immerse yourself
22.Describe how to in configure
a wealth ofkey
knowledge with this
infrastructure piece, supported
services like DHCP by andthe
DNS in
inclusive
Linux. To DEV Community—every
configure a DHCP server in developer, no matter
Linux, I typically where
install they package
the dhcp are in their
and
edit the configuration
journey, is invited to file located to
contribute at our collective wisdom., where I define the subnet,
/etc/dhcp/dhcpd.conf
range of IP addresses, and other options. After configuring, I start the DHCP service
A simple
using “thank you”
systemctl startgoes
dhcpda .long way—express
For DNS, I often useyour
BINDgratitude below
(Berkeley in the
Internet Name
comments!
Domain). I install BIND, configure the zone files in /etc/bind/ , and set up
the named.conf file to define the zones. I then start the BIND service with systemctl
Gathering insights enriches our journey on DEV and fortifies our community
start named .
ties. Did you find this article valuable? Taking a moment to thank the author
can have athe
23.Explain significant
processimpact.
of configuring the Apache Web server for web services in
Linux. To configure the Apache Web server, I first install it using the package manager
Okay
(e.g., sudo apt install apache2 on Debian-based systems). After installation, I can edit
the main configuration file located at /etc/apache2/apache2.conf or create virtual host

https://dev.to/ken_mwaura1/linux-answers-pbb 6/13
1/8/25, 10:58 PM 28 Common Linux 🐧Questions And Answers 🖥️ - DEV Community
files in /etc/apache2/sites-available/ . To enable a virtual host, I use
the a2ensite command, and then restart Apache with sudo systemctl restart
apache2 . I also ensure that the firewall allows HTTP/HTTPS traffic using ufw allow
'Apache Full' .

24.What are the different facets of Linux security and how can you increase the
security of a Linux computer? Linux security encompasses user permissions, firewall
configuration, regular updates, and system auditing. To increase security, I can enforce
strong password policies, use tools like iptables or ufw for firewall settings, regularly
apply security patches, and implement SELinux or AppArmor for additional access
control. Additionally, I can minimize the number of running services and use SSH keys
for secure remote access instead of passwords.

25.Describe effective troubleshooting practices for common hardware and


software problems in Linux. Effective troubleshooting in Linux involves several steps:

Identify the Problem: Gather information about the issue, including error messages
and logs.
Check Logs: Review system logs in /var/log/ (like syslog or dmesg ) for relevant
messages.
Use Diagnostic Tools: Utilize commands like ping , traceroute , and top to
diagnose network issues and system performance.
👋 Research: Look up error messages online or consult documentation.
Kindness is contagious
Testing: Isolate the issue by testing hardware components or reverting recent
Immerse
changes.yourself in a wealth of knowledge with this piece, supported by the
inclusive DEV IfCommunity—every
Seek Help: developer,
needed, reach out to no matter where
forums or communities they are in their
for assistance.
journey, is invited to contribute to our collective wisdom.
26.Explain the difference between UNIX and Linux operating systems. UNIX is a
A simple “thank
proprietary you”system
operating goes adeveloped
long way—express your
in the 1970s, gratitude
while Linux below in the
is an open-source
comments!
clone of UNIX created by Linus Torvalds in the early 1990s.

Gathering
27.What insightsVolume
is Logical enriches our journey
Management on DEV
(LVM) and fortifies
in Linux, and whatourare
community
its
advantages? Logical
ties. Did you find this Volume Management
article valuable? (LVM)
Taking is a system
a moment for managing
to thank the authordisk
storage
can have in Linux that allows
a significant for flexible allocation of storage space. With LVM, I can
impact.
create logical volumes that can be resized dynamically, which is useful for managing
storage
Okayneeds over time. Advantages of LVM include:

https://dev.to/ken_mwaura1/linux-answers-pbb 7/13
1/8/25, 10:58 PM 28 Common Linux 🐧Questions And Answers 🖥️ - DEV Community
Dynamic Resizing: I can easily increase or decrease the size of logical volumes as
needed.
Snapshots: LVM allows me to create snapshots of volumes, which can be useful for
backups or testing.
Pooling of Storage: Multiple physical disks can be combined into a single logical
volume, simplifying storage management.
Improved Disk Utilization: LVM helps in efficiently managing disk space across
multiple partitions.

28.Discuss the role of systemd in managing services and daemons in


Linux. Systemd is a system and service manager for Linux operating systems that has
become the default init system for many distributions. Its role includes:

Service Management: Systemd manages services (daemons) using unit files,


allowing for easy starting, stopping, enabling, and disabling of services.
Parallel Startup: It can start services in parallel, which improves boot times
compared to traditional init systems.
Dependency Management: Systemd handles service dependencies, ensuring that
services start in the correct order based on their requirements.
Logging: It integrates with the journal system to provide logging capabilities,
allowing for easy access to logs via the journalctl command.
Socket and Timer Activation: Systemd can start services on-demand when a
👋 Kindness is contagious
socket is accessed or at scheduled times, optimizing resource usage.

Immerse yourself in a wealth of knowledge with this piece, supported by the


Conclusion
inclusive DEV Community—every developer, no matter where they are in their
Congratulations on to
journey, is invited exploring the to
contribute basics of Linux! We
our collective hope this collection of common
wisdom.
questions and answers has made your introduction to Linux a little easier and more
A simple “thank
enjoyable. you” goes
Remember, everyaexpert
long way—express your gratitude
was once a beginner, so don’tbelow in the
be afraid to
experiment
comments!and ask questions as you learn. With practice and curiosity, you’ll soon feel
at home in the Linux environment. Keep exploring, and enjoy your journey into the world
Gathering
of insights
open-source enriches our journey on DEV and fortifies our community
technology!
ties. Did you find this article valuable? Taking a moment to thank the author
Ican
hope you ahave
have enjoyedimpact.
significant this article. If you have any questions, please feel free to reach
out to me on Twitter. or LinkedIn. You can also check out my other articles on Dev.to.
Thanks
Okayfor reading!
Support me by buying me a coffee
https://dev.to/ken_mwaura1/linux-answers-pbb 8/13
1/8/25, 10:58 PM 28 Common Linux 🐧Questions And Answers 🖥️ - DEV Community

Coherence PROMOTED

👋 Kindness is contagious
Immerse yourself in a wealth of knowledge with this piece, supported by the
inclusive DEV Community—every developer, no matter where they are in their
journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the
comments!

Gathering insights enriches our journey on DEV and fortifies our community
ties. Did you find this article valuable? Taking a moment to thank the author
can have a significant impact.

Okay

https://dev.to/ken_mwaura1/linux-answers-pbb 9/13
1/8/25, 10:58 PM 28 Common Linux 🐧Questions And Answers 🖥️ - DEV Community
The Next Generation Developer Platform
Coherence is the first Platform-as-a-Service you can control. Unlike "black-box"
platforms that are opinionated about the infra you can deploy, Coherence is
powered by CNC, the open-source IaC framework, which offers limitless
customization.

Learn more

Top comments (0)

Code of Conduct • Report abuse

Sentry PROMOTED

👋 Kindness is contagious
Immerse yourself in a wealth of knowledge with this piece, supported by the
inclusive DEV Community—every developer, no matter where they are in their
journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the
comments!

Gathering insights enriches our journey on DEV and fortifies our community
ties. Did you find this article valuable? Taking a moment to thank the author
can have a significant impact.

Okay

https://dev.to/ken_mwaura1/linux-answers-pbb 10/13
1/8/25, 10:58 PM 28 Common Linux 🐧Questions And Answers 🖥️ - DEV Community

👋 Kindness is contagious
Immerse yourself in a wealth of knowledge with this piece, supported by the
inclusive DEV Community—every developer, no matter where they are in their
journey, is invited to contribute to our collective wisdom.
See why 4M developers consider Sentry, “not
A simple “thank you” goes a long way—express your gratitude below in the
bad.”
comments!
Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can
help.
Gathering insights enriches our journey on DEV and fortifies our community
ties. Did you find this article valuable? Taking a moment to thank the author
can have a significant impact. Learn more

Okay

https://dev.to/ken_mwaura1/linux-answers-pbb 11/13
1/8/25, 10:58 PM 28 Common Linux 🐧Questions And Answers 🖥️ - DEV Community
Zoo Codes

Python developer, Azure Devops certified, Technical Writer. Buy me a [coffee]


(https://www.buymeacoffee.com/kenmwaura1)

LOCATION
Nairobi Kenya

PRONOUNS
He/Him

WORK
Software Engineer
JOINED
Dec 14, 2019

More from Zoo Codes

My Secret to Staying Ahead of the Tech Curve: How daily.dev Has Been a Game-Changer
#productivity #developers #learning #tooling

From OVA to Qcow2: A Step-by-Step Guide to Unlocking Qemu's Power


#linux #virtualmachine #tutorial #bash
👋 Kindness is contagious
Deployments and Load Balancing in Kubernetes
Immerse yourself in a wealth of knowledge with this piece, supported by the
#kubernetes #tutorial #webdev #devops
inclusive DEV Community—every developer, no matter where they are in their
journey, is invited to contribute to our collective wisdom.
Sentry PROMOTED

A simple “thank you” goes a long way—express your gratitude below in the
comments!

Gathering insights enriches our journey on DEV and fortifies our community
ties. Did you find this article valuable? Taking a moment to thank the author
can have a significant impact.

Okay

https://dev.to/ken_mwaura1/linux-answers-pbb 12/13
1/8/25, 10:58 PM 28 Common Linux 🐧Questions And Answers 🖥️ - DEV Community

👋 Kindness is contagious
Immerse yourself in a wealth of knowledge with this piece, supported by the
inclusive DEV Community—every developer, no matter where they are in their
journey, is invited to contribute to our collective wisdom.
Sick of your mobile apps crashing?
A simple “thank you” goes a long way—express your gratitude below in the
Let Simon Grimm show you how to fix them without the guesswork. Join the workshop and get to
comments!
debugging.
Gathering insights enriches our journey on DEV and fortifies our community
SaveTaking
ties. Did you find this article valuable? your spot →
a moment to thank the author
can have a significant impact.

Okay

https://dev.to/ken_mwaura1/linux-answers-pbb 13/13

You might also like