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

Linux Commands Microproject

Uploaded by

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

Linux Commands Microproject

Uploaded by

godseyash65
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Linux Commands Microproject

Introduction
This microproject covers a series of essential Linux commands for basic system
interactions, user management, and service control. Each command includes a description,
sample usage, and example output to help understand its functionality.

date
Description: Displays the current date and time.
Usage: date
Example:
Sun Nov 10 12:34:56 UTC 2024

time
Description: Measures the time taken by a command to execute.
Usage: time <command>
Example:
time ls

Outputs the time taken to execute the ls command.

cal
Description: Shows a calendar for the current month or a specific year.
Usage: cal or cal <year>
Example:
cal 2024

clear
Description: Clears the terminal screen.
Usage: clear
Example:
Screen is cleared
banner
Description: Displays text in a large ASCII format (may not be installed by default).
Usage: banner <text>
Example:
banner Hello

Outputs 'Hello' in large ASCII text.

tty
Description: Prints the file name of the terminal connected to standard input.
Usage: tty
Example:
/dev/pts/0

script
Description: Records a terminal session to a file.
Usage: script <filename>
Example:
script session.txt

Starts recording the terminal session to session.txt. Type exit to stop.

man
Description: Displays the manual page for a command.
Usage: man <command>
Example:
man ls

Shows the manual page for the ls command.


who
Description: Shows who is logged into the system.
Usage: who
Example:
user1 pts/0 2024-11-10 12:34

who am i
Description: Shows the current logged-in user's details.
Usage: who am i
Example:
user1 pts/0 2024-11-10 12:34

login
Description: Logs into the system (usually used at the start of a session).
Usage: login
Example:
Typically used during system boot for user login.

passwd
Description: Changes the user's password.
Usage: passwd
Example:
Only the root or the current user can change passwords.

su
Description: Switches to another user account or to root.
Usage: su <username>
Example:
su root

Switches to the root user.


pwd
Description: Prints the current working directory.
Usage: pwd
Example:
/home/user

start
Description: Starts a specified service.
Usage: sudo service <service_name> start
Example:
sudo service apache2 start

Starts the Apache web server.

stop
Description: Stops a specified service.
Usage: sudo service <service_name> stop
Example:
sudo service apache2 stop

Stops the Apache web server.

restart
Description: Restarts a specified service.
Usage: sudo service <service_name> restart
Example:
sudo service apache2 restart

Restarts the Apache web server.


Conclusion
This microproject covers basic Linux commands for system interaction, user management,
and service control. Understanding these commands will help navigate and manage Linux
systems effectively.

Tips
- Use the `man` command to explore each command further.
- Experiment with these commands in a Linux environment to gain practical experience.
- Try combining commands in scripts to automate repetitive tasks.

You might also like