Commandos Prac 2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Mushoro Ruzani

1.Linux system

Commands Used

1. pwd – Displays the current working directory.

2. cd – Changes the current directory.

3. ls – Lists the contents of a directory.

4. man – Opens the manual for a command or directory, offering detailed explanations.

5. cat, more, or less – To view text files (especially configuration files in /etc).

Important Directories and their Functions:

1./etc – Configuration Files

The /etc directory contains system-wide configuration files and shell scripts that are used to boot,
start, stop, and configure system settings. Examples include network configurations, user
accounts, and various services.

Common files:

i)passwd: Contains user account information.


Mushoro Ruzani

ii)fstab: Contains information on disk drives and partitions.

2. /bin – Essential User Binaries

/bin holds essential user command binaries (executable files) that are required for system
operation in single-user mode. These commands are used for system recovery, maintenance, or
during boot-up. Examples of binaries stored here include basic commands like ls, cp, mv, bash.

Example: ls /bin to list commands like ls, echo, mkdir, cat, etc.
Mushoro Ruzani

3./usr – User Binaries and Programs

/usr contains user-installed software and libraries, and it's generally where larger packages reside,
along with their dependencies.

It has several subdirectories:

/usr/bin: Non-essential user command binaries.

/usr/lib: Libraries needed by software in /usr/bin.

/usr/share: Shared files and documentation.

Example: ls /usr/bin to see more command binaries like python, gcc, etc.

4. /var – Variable Data Files

Description: The /var directory holds


variable data files like logs, databases, caches, and email spools. Files in /var often change in size
and content over time. Some important subdirectories include:

i) /var/log: System log files.

ii) /var/mail: Incoming mail.

iii) /var/lib: State information for programs.

Example: ls /var/log to see system logs like syslog, dmesg, auth.log.


Mushoro Ruzani

5./home – User Home Directories

The /home directory is where all user personal directories are stored. Each user has a
subdirectory under /home where their personal files, configuration settings, and documents are
saved. For example, the home directory for user john would be /home/john.

Example: cd /home/username && ls to list files in a specific user's home directory.

2.Key Directories in Windows File System


1.C:\Windows

Purpose: This is the main directory where the Windows operating system is installed. It contains
critical files for system operations, configuration, and libraries.

Key Subfolders:

System32: Contains essential system files and libraries (DLLs) necessary for Windows to
function.
Mushoro Ruzani

WinSxS: Stores multiple versions of system files (side-by-side assemblies) to support different
applications.

Temp: Temporary files created by the system or applications during operation.

2. C:\Program Files

Purpose: This directory is where most applications installed on the system store their files. It is
the default location for 64-bit programs.

Key Subfolders:

Each installed program typically has its own folder where its executable files, libraries, and other
necessary data are stored.

Common Files: Shared libraries and resources used by multiple programs are stored here.

3. C:\Program Files (x86)


Mushoro Ruzani

Purpose: This directory is for 32-bit applications on a 64-bit version of Windows. It separates
32-bit apps from 64-bit apps to prevent compatibility issues.

4. C:\Users

Purpose: This folder contains user-specific data and files. Each user has their own directory
here, where personal settings, documents, and application data are stored.

Key Subfolders:
Mushoro Ruzani

Documents: The default location for personal documents.

Desktop: Stores files and shortcuts that appear on the user's desktop.

AppData: Contains user-specific application data and settings, further divided into Local,
LocalLow, and Roaming subfolders.

5. C:\ProgramData

Purpose: This is a hidden directory that contains data shared between all users on the system.
Applications store data here that isn’t user-specific, such as configuration files.

6. C:\Temp

Purpose: This is where temporary files are stored. The system and applications use this directory
for temporary data that is no longer needed once the task is completed.

You might also like