Lab report name: Usages of basic
Linux command
Purpose: Linux commands serve a variety of purposes and
functions within the Linux operating system. They allow users to
interact with the system, manage files and directories, perform
administrative tasks, and execute various operations. Here are some
common purposes of Linux commands:
i. System Navigation and File Management
ii. Text Manipulation
iii. Process Management
iv. User and Group Management
v. System Information
vi. Pakage management
Necessary equipment: Using Linux typically doesn't
require any specialized equipment beyond what you would need for
any computer usage. However, there are some considerations to
keep in mind:
i. Hardware: Linux is versatile and can run on a wide range
of hardware, from low-powered devices like Raspberry Pi to
high-end servers. Make sure your hardware meets the
system requirements of the specific Linux distribution you
intend to use.
ii. Computer or Device: You'll need a computer or device
on which to install Linux. This can be a desktop computer,
laptop, server, or even a single-board computer like
Raspberry Pi.
iii. Storage: You'll need sufficient storage space to install the
Linux operating system and any applications you plan to
use. This can be a hard drive or solid-state drive (SSD).
iv. Memory (RAM): The amount of RAM you have will
affect the performance of your Linux system, especially if
you're running resource-intensive applications or services.
v. Monitor, Keyboard, and Mouse: These are standard
peripherals you'll need to interact with your Linux system.
vi. Internet Connection: An internet connection is not
strictly necessary, but it's often useful for software updates,
package installations, and accessing online resources.
Procedure:Some basic linux command and there works are
here:
[Link] command
Use the mkdir command to create one or multiple directories at
once and set permissions for each of them. The user executing
this command must have the privilege to make a new folder in
the parent directory, or they may receive a permission denied
error.
Here’s the basic syntax:
mkdir [option] directory_name
For example, you want to create a directory called rakibul-islam:
mkdir rakibul-islam
[Link] command
The ls command lists files and directories within a system.
Running it without a flag or parameter will show the current
working directory’s content.
To see other directories’ content, type ls followed by the desired
path. For example, to view files in the Documents folder, enter:
ls /home/username/Documents
[Link] command
Use the pwd command to find the path of your current working
directory. Simply entering pwd will return the full current path – a
path of all the directories that starts with a forward slash (/). For
example, /home/username.
The pwd command uses the following syntax:
pwd rakibul-islam
[Link] command
The touch command allows you to create an empty file or
generate and modify a timestamp in the Linux command line.
For example, enter the following command to create an HTML file
named Web in the Documents directory:
touch /home/username/Documents/[Link]
[Link] command
To navigate through the Linux files and directories, use
the cd command. Depending on your current working directory, it
requires either the full path or the directory name.
Running this command without an option will take you to the
home folder. Keep in mind that only users with sudo privileges
can execute it.
[Link] command
The primary use of the mv command is to move and rename
files and directories. Additionally, it doesn’t produce an output
upon execution.
Simply type mv followed by the filename and the destination
directory. For example, you want to move [Link] to
the /home/username/Documents directory:
mv [Link] /home/username/Documents.
You can also use the mv command to rename a file:
mv old_filename.txt new_filename.txt
[Link] command
The fastest way to clear the terminal screen in Linux is with the clear command. In most
terminal emulators, like GNU, running clear without any arguments creates a blank-slate
screen:
Decision: Making decisions about which Linux commands to
use depends on the specific task you're trying to accomplish and
the context in which you're working. Here's a general process to
help you make decisions about using Linux commands:
Conclution: Remember that becoming proficient with Linux
commands takes time and practice. Start with simple tasks and
gradually work your way up to more complex operations. Over time,
you'll build a solid foundation and be able to confidently make
decisions about which Linux commands to use based on your
specific needs.
Precautions: Certainly, here are some important precautions
to follow when working with Linux commands to ensure the safety
and stability of your system:
1. Backup Your Data: Before performing any major operations, such as system
upgrades, installations, or configurations, always back up your important data to
prevent data loss in case of unforeseen issues.
2. Use the "--help" Option: Most Linux commands come with built-in help
documentation. Use the --help option (e.g., command --help) to view the
command's options, usage, and examples before executing it.
3. Read the Manual: Use the man command to access the manual pages for commands
(man command-name). The manual provides in-depth information about the
command, its options, and proper usage.