Skip to content

Latest commit

 

History

History
40 lines (15 loc) · 806 Bytes

Operating Systems (OS).md

File metadata and controls

40 lines (15 loc) · 806 Bytes

Operating Systems (OS)

c

An operating system is the software that manages computer hardware and software resources and provides common services for computer programs. Understanding how an OS works is essential for developing software that interacts with the underlying system. Here's an example of a simple OS operation in Python using the os library:

import os

Get the current working directory

cwd = os.getcwd()

print('Current working directory:', cwd)

Create a new directory

os.mkdir('new_dir')

Change the current working directory

os.chdir('new_dir')

print('New current working directory:', os.getcwd())

Delete the directory

os.chdir('..')

os.rmdir('new_dir')