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

Linux Group Assignment

The document outlines a group task for a course on System Administration in Linux at the University of Dar es Salaam, detailing various commands and concepts related to Linux system management. It includes tasks such as finding the present directory, managing files and directories, configuring system startup files, and understanding the init process. Additionally, it explains the purpose of certain commands and system files, providing a comprehensive overview of essential Linux administration practices.

Uploaded by

Arnold Masmini
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Linux Group Assignment

The document outlines a group task for a course on System Administration in Linux at the University of Dar es Salaam, detailing various commands and concepts related to Linux system management. It includes tasks such as finding the present directory, managing files and directories, configuring system startup files, and understanding the init process. Additionally, it explains the purpose of certain commands and system files, providing a comprehensive overview of essential Linux administration practices.

Uploaded by

Arnold Masmini
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

UNIVERSITY OF DAR ES SALAAM

COLLEGE OF INFORMATION AND COMMUNICATION


TECHNOLOGY (COICT)

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


(CSE)

COURSE: SYSTEM ADMINISTRATION IN


LINUX
COURSE CODE: IS 371
INSTRUCTOR’S NAME: DR. JIMMY MBELWA
GROUP TASK: TASK 01

MEMBERS:
S/ NAME REGISTRATIO DEGREE
N N NUMBER PROGRAMME
1. MASEKE, KAREN C. 2022-04-06412 BSc in CS
2. KILIMBA,KENNETH 2022-04-04249 BSc in CS
MARTIN
3. KONYOKA, LOUIS 2022-04-04729 BSc in CS
4. MASMINI,ARNOLD 2022-04-06484 BSc in CS
ANDREW
1. Command to find the present directory.
pwd- print working directory

2. Difference between /bin and /sbin directories.

3. Write a command to copy the file/etc/resolv.conf in test


directory.

4. Write a command to rename test directory to testing.

5. Write a command to delete the testing directory and its


contents.
6. Write a command to change the permissions of guest
directory to 775.

7. Explain the difference between single and multi-user run


levels.

8. Identify and configure system startup files.


System startup files are files responsible for configuring the system's environment and
starting necessary services during the boot process. These files vary based on the init
system used.

To configure the system startup files:


1. Identify your init system by running the following command whereby
“systemd”, “init”, or “upstart” will appear.
2. Modify the relevant startup files which can be found in the directories based
on their init systems:
 SysVinit: /etc/inittab, /etc/rc.local
 Upstart: /etc/init/
 systemd: Create or edit .service files under /etc/systemd/system/.

9. Write a command to shutdown the system immediately.

10. Write a command to delete all files with a particular


extension in a particular folder.
EXAMPLE: Deleting all files with an extension “.txt” in a folder “/home/user”

11.Write a command to determine your system run level.


runlevel command. This command will display the previous and
current runlevels of the system.

12. Write the specific configuration file for the GRUB


“boot/grub/grub.cfg” This file specifies the menu options that are
displayed when the system
boots, as well as the kernel and initrd images that should be loaded.
sudo grub-mkconfig -o /boot/grub/grub.cfg

13.Write a command to remove the elvis package using apt-


get.

“sudo apt-get remove elvis” this command will remove “elvis”


package and dependencies but will keep configuration files for the
package.
While “sudo apt-get purge elvis” this command will completely
remove “elvis” package leaving
nothing in check.

14. Write a command to install the chrome package using


dpkg
To install the chrome package using dpkg.
The following command will be used:

sudo dpkg -i google-chrome-stable_current_amd64.deb

15. Write a command to display all the current memory usage in


megabytes and display total lines
free -m | awk '1; END {print "Total Lines:", NR}'

16. Write a command to display all lines from File2 that contain Happy, happy, Sad,
sad, Angry, or angry.
17. What is the purpose of the initrd line in a GRUB configuration?

The initrd line in a GRUB configuration specifies the location of the initial RAM disk
(initrd) file, a temporary filesystem loaded into memory during the early stages of the
boot process. It provides the kernel with essential drivers and tools needed to initialize
hardware, load kernel modules, and prepare the environment for mounting the actual
root filesystem. This is crucial for systems with advanced storage setups or encrypted
filesystems, enabling a flexible and modular boot process.

18.You want to connect a laptop computer to a public Wi-Fi network, but you don’t
know its name or other relevant data. What command can you type as root to find this
information? (Assume that your wireless network interface is wlan0.)

To find information about a public Wi-Fi network, you can use the iwlist command as
root. This command is specifically designed to scan for wireless networks and provide
detailed information about them. It works with wireless network interfaces, such as
wlan0, and is useful for identifying nearby networks when the network name (SSID)
or other details are unknown.

To perform a scan, use the command iwlist wlan0 scan. This will instruct the wlan0
interface to search for all available Wi-Fi networks within range. The output will
display a list of detected networks, including their SSIDs (names), signal strength,
security types and the channels or frequencies they are using. This information helps
you identify the network you wish to connect to and assess its strength and security.

The iwlist command is particularly helpful for troubleshooting connectivity issues or


exploring available public Wi-Fi networks in your area. While it requires root
privileges to run, modern tools like nmcli or graphical interfaces can also assist with
scanning and connecting to networks more interactively. However, iwlist remains a
reliable option for command-line users.

19.What is the first program the Linux kernel runs once the kernel itself is running,
assuming a normal Linux startup procedure?

The first program executed by the Linux kernel after initialization is the init program.
It is responsible for starting all essential services and processes required to bring the
system to a usable state. The specific behavior of init depends on the system's
initialization framework, which can vary across distributions.

The most common initialization systems are:

 System V init: The traditional method, relying on scripts and configuration


files found in /etc/init.d and /etc/rc*.d.
 Upstart: An event-driven system, offering more flexibility, with configuration
stored in the /etc/init directory.
 systemd: The modern default, known for its parallelization capabilities and
faster boot times, configured through files in /etc/systemd/system.

Regardless of the system used, the init program’s primary function is to set up the
environment, start necessary services, and ensure the system is fully operational for
user interaction.

20.What might you find in the /etc/init.d directory?


The /etc/init.d directory is used to store scripts that manage system services on Linux
systems using the System V init initialization system. These shell scripts are
responsible for starting, stopping, and controlling various system services, such as
networking, cron, and SSH. The init program executes these scripts during system
startup to bring the system to a fully operational state, ensuring essential services are
running. Each script typically supports various commands, like start, stop, restart, and
status, to control the corresponding service.

You might also like