Share
Explore

Here's a student lab learning guide to teach the basics of Linux system administration using a Linux image under Oracle VirtualBox:

megaphone
Learning Outcomes:
Install Kali Linux, a popular penetration testing distribution that will help us learn about cybersecurity and ethical hacking.
We'll do this by installing Kali Linux onto Oracle VirtualBox, a free virtualization software that allows us to run multiple operating systems on our machines without any hassle.
So, let's get started!Step
done: Downloading Kali Linux-----------------------------
First things first, we need to download Kali Linux from its official website. Open your web browser and navigate to <https://www.kali.org/>.
Look for the "Downloads" section and click on it.
You'll see various options for downloading Kali Linux, including Torrent and direct download links.
Choose the one that suits you best. For this example, I'll use the direct download link.|

|Step 2: Creating a New Virtual Machine-----------------------
Now that we have downloaded Kali Linux, it's time to create a new virtual machine in Oracle VirtualBox.
image.png
image.png

Open VirtualBox and click on "New" to create a fresh virtual machine.
Give your virtual machine a name (e.g., "KaliLinux"), select a category (e.g., "Other"), and choose the version of Windows or Linux that you want to emulate.
Since Kali Linux is based on Debian, I'll select "Debian" as the operating system.|
|Step 3: Allocating Resources---------------------------
In this step, we'll allocate resources to our virtual machine.
You can adjust the amount of RAM and CPU cores according to your computer's specifications.
Make sure to assign at least 1 GB of RAM and one CPU core for optimal performance.
You can also add an existing hard drive or create a new virtual hard drive for Kali Linux.
For this example, I'll create a new virtual hard drive with 20 GB of space.

|Step 4: Installing Kali Linux-----------------------------
Now that we have created our virtual machine, it's time to install Kali Linux.
Select the virtual machine you just created, and click on "Settings" in the top right corner. In the settings menu, navigate to the "Storage" tab.
Here, you'll see a dropdown list labeled "Controller". Select "SATA" from the list.
Then, click on the "Add disk" button and select "Dynamically allocated" from the options. Choose the file type as "VDI (VirtualBox Disk Image)" and click "Save."
A new window will pop up asking for the location of the disk image file. Navigate to the folder where you downloaded Kali Linux and select the ISO file. Click "Open," and VirtualBox will start installing Kali Linux onto your virtual hard drive.| ![VirtualBox Add Disk]

|Step 5: Boot Up Kali Linux---------------------------After installation, start your virtual machine by clicking on "Start" in the top left corner. Your virtual machine will boot up, and you'll see the Kali

For initial Login:

kali for user name

kali for initial password

info

Congratulations! You have successfully installed Kali Linux on your Oracle VirtualBox. Now, let's log in to your new Kali installation.

By default, the root password for a fresh install of Kali Linux is blank.


That means you won't be prompted to set a password during the initial setup process.

However, it's highly recommended that you set a strong password for the root user to secure your system.

To log in to your Kali installation, follow these steps:

1. Start your virtual machine and ensure that it's booted up completely. You should see the Kali Linux logo and a login prompt.

2. Press Enter to access the login screen.


You'll see two options - "Kali Linux" and "Other".

Select "Kali Linux" by pressing the arrow key and press Enter.

3. At the login prompt, enter the username "root" (without quotes) and press Enter.

Since the root password is empty by default, you won't be asked to enter a password.

4. Once you're logged in, you'll be taken to the Kali Linux command line interface.

From here, you can start exploring the system and running commands as the root user.

It's important to note that leaving the root password blank can pose a security risk if you plan to use your Kali installation for production or critical tasks.

It's strongly advised that you set a strong password for the root user as soon as possible. To do this, you can run the following command at the terminal:

passwd grapefruit

Follow the prompts to set a new password for the root user.

Make sure it's a strong and unique password that you don't use for any other account.

Now that you have successfully logged in to your Kali Linux installation, you're ready to explore the system and start learning about penetration testing and ethical hacking. Remember to practice responsible and ethical behavior when using your newfound skills!

Linux System Administration Lab Learning Guide

This lab learning guide is designed to help students learn the basics of Linux system administration using a Linux image under Oracle VirtualBox.
The lab exercises will cover essential tasks and concepts that will build a solid foundation in Linux administration.
Requirements: To complete the lab exercises, you'll need the following:
A computer with Oracle VirtualBox installed.
A Linux ISO image (e.g., Ubuntu, CentOS) for installation in VirtualBox.
Basic knowledge of Linux commands and navigation.
Lab Exercises:
done: Install Linux on VirtualBox:
Download the Linux ISO image from the official website.
Open Oracle VirtualBox and create a new virtual machine.
Configure the virtual machine settings (including memory and storage).
Start the virtual machine and install Linux from the ISO image.
Follow the on-screen instructions to complete the installation.
Basic Linux Commands: Open the root terminal icon in your Kali Linux GUI Screen
Practice using common Linux commands such as ls, cd, pwd, mkdir, rm, etc.
Learn how to navigate the file system and understand file permissions.
Experiment with redirection, piping, and basic shell scripting.
User and Group Management:
Create new users and assign them to different groups.
Set up password policies and manage user passwords.
Understand file ownership and group permissions.
Practice adding and removing users and groups.
File System Management:
Learn how to mount and unmount filesystems.
Format disks/partitions using different file systems (e.g., ext4).
Experiment with disk quotas to limit disk usage for specific users.
Practice managing file permissions and ownership.
Network Configuration:
Understand basic networking concepts in Linux.
Configure network interfaces and set IP addresses.
Practice troubleshooting network connectivity issues.
Configure DNS settings and test connectivity to external resources.
Package Management:
Learn how to install, update, and remove software packages using package managers like apt or yum.
Practice managing software repositories and updating the system.
Install and configure common Linux system utilities and software.
Conclusion: This lab learning guide provides a structured approach to learning the basics of Linux system administration using a Linux image under Oracle VirtualBox. By completing the exercises, students will gain practical experience and a strong foundation in Linux administration concepts and tasks.
Remember to explore additional resources, such as online tutorials and documentation, to enhance your understanding of Linux system administration. Happy learning!

megaphone
Here are the steps to enter text from the console into a file called `bbb`:
1. Open the terminal application on your system.
2. Type `echo "Hello World!" > bbb` and press Enter. This will create a new file called `bbb` in the current directory and write the string "Hello World!" to it.
3. Alternatively, you can use a text editor such as nano or vim to create the file and type in the text. For example, you can type `nano bbb` and press Enter to open the file in nano, then type in the text and save it by pressing Ctrl+X, then Y, and then Enter.
4. If you want to append text to a existing file instead of creating a new one, you can use the `>>` symbol. For example, to append the text "This is a test." to the end of the file `bbb`, you can type `echo "This is a test." >> bbb` and press Enter. 5. You can also use a redirection operator to copy the output of a command into a file. For example, to save the output of the command `ls -l` into a file called `bbb`, you can type `ls -l > bbb` and press Enter. This will create a file called `bbb` with the contents of the `ls -l` command. 6. To read the contents of a file called `bbb`, you can use the `cat` command followed by the name of the file. For example, to display the contents of the file `bbb`, you can type `cat bbb` and press Enter. 7. You can also use a text editor such as nano or vim to open the file and view its contents. For example, you can type `nano bbb` and press Enter to open the file in nano, then press Ctrl+R to scroll through the contents of the file.
megaphone

Here are the details on how to perform each activity for practicing basic Linux commands:

1. List all files and directories in the current directory: Command: `ls` Details: Open the terminal and navigate to the directory you want to list the files and directories. Then, enter the command "ls" and press enter. The output will display the names of all files and directories present in the current directory.
2. Change to the root directory: Command: `cd /` Details: Open the terminal and enter the command "cd /" to navigate to the root directory. The root directory is the top-level directory in the file system.
3. Display the present working directory: Command: `pwd` Details: Open the terminal and simply enter the command "pwd" to display the current working directory. The output will show the full path of the current directory.
4. Create a new directory called "test": Command: `mkdir test` Details: Open the terminal and enter the command "mkdir test". This will create a new directory named "test" in the current directory.
5. Navigate into the "test" directory: Command: `cd test` Details: Open the terminal and enter the command "cd test" to navigate into the "test" directory. This will change the current directory to "test".
6. Create a new empty file called "file1.txt" inside the "test" directory: Command: `touch file1.txt` Details: Open the terminal and enter the command "touch file1.txt" while inside the "test" directory. This will create a new empty file named "file1.txt".
7. Display the contents of "file1.txt" using a command: Command: `cat file1.txt` Details: Open the terminal and enter the command "cat file1.txt" while inside the "test" directory. This will display the contents of the "file1.txt" file, if any.
8. Rename "file1.txt" to "file2.txt": Command: `mv file1.txt file2.txt` Details: Open the terminal and enter the command "mv file1.txt file2.txt" while inside the "test" directory. This will rename the "file1.txt" file to "file2.txt".
9. Move "file2.txt" to the parent directory: Command: `mv file2.txt ..` Details: Open the terminal and enter the command "mv file2.txt .." while inside the "test" directory. This will move the "file2.txt" file to the parent directory.
10. Delete the "test" directory and all its contents recursively: Command: `rm -r test` Details: Open the terminal and enter the command "rm -r test" to delete the "test" directory and all its contents recursively. Be cautious while using this command, as it will permanently remove the directory and its contents.
11. List all files in the current directory, including hidden files: Command: `ls -a` Details: Open the terminal and enter the command "ls -a" to list all files in the current directory, including hidden files and directories. The output will display all files, including those with names starting with a dot (hidden files).
12. Change the permission of a file to read and write for the owner only: Command: `chmod 600 filename` Details: Open the terminal and enter the command "chmod 600 filename" to change the permission of the specified file, replacing "filename" with the actual file name. This command grants read and write permissions exclusively to the owner of the file.
13. List all processes running on the system: Command: `ps -ef` Details: Open the terminal and enter the command "ps -ef" to list all processes running on the system. The output will display details such as process IDs, user names, and the commands associated with each process.
14. Sort the output of a file containing a list of names alphabetically: Command: `sort filename` Details: Open the terminal and enter the command "sort filename" to sort the lines in the specified file in alphabetical order. Replace "filename" with the actual file name you want to sort.
15. Display the first 10 lines of a text file: Command: `head -n 10 filename` Details: Open the terminal and enter the command "head -n 10 filename", replacing "filename" with the actual file name. This command will display the first ten lines of the specified text file.
16. Count the number of lines in a file: Command: `wc -l filename` Details: Open the terminal and enter the command "wc -l filename" to count the number of lines in the specified file. Replace "filename" with the actual file name you want to count the lines of.
17. Search for a specific pattern in a file and print the matching lines: Command: `grep "pattern" filename` Details: Open the terminal and enter the command "grep "pattern" filename", replacing "pattern" with the specific pattern you want to search for and "filename" with the actual file name. This command will display all the lines in the file that contain the specified pattern.
18. Find and replace a word in a file using a command: Command: `sed -i 's/old_word/new_word/g' filename` Details: Open the terminal and enter the command "sed -i 's/old_word/new_word/g' filename", replacing "old_word" with the word you want to replace, "new_word" with the replacement word, and "filename" with the actual file name. This command will find all occurrences of the old word in the file and replace them with the new word.
19. Create a shell script that prints your name when executed: Details: Open a text editor and create a new file with the extension ".sh". Add the following script to the file: ``` #!/bin/bash echo "Your Name" ``` Save the file, and then open the terminal and run the script by entering the command "bash filename.sh", replacing "filename.sh" with the name of the script file you created.
20. Chain multiple commands together to achieve a specific task: Details: This activity involves combining multiple commands using special characters such as "|" (pipe) or ";" (semicolon) to execute them sequentially or concurrently. For example, you can chain multiple commands to find all files modified in the last 24 hours and copy them to a new directory like this: ``` find /path/to/directory -type f -mtime 0 -exec cp {} /path/to/new_directory \; ``` Replace "/path/to/directory" with the actual directory path and "/path/to/new_directory" with the destination directory path.
Remember to practice these commands in a safe environment and take precautions when performing actions that may modify or delete files or directories.
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.