Deliverables: Answer all the questions above and provide output (A1 through A5). Please submit all your consolidated answers in a WORD document
System Requirements to complete this lab
2. Ubuntu Operating System (You could use any version starting 16.04, 18.04, or 20.04)
This lab is to install and experience with a Linux server system, Ubuntu in VirtualBox (For those of you who are using Vmware or Parallel Desktops, you can still perform the same). After system starting, check whether the system works correctly. Use command lines, and try commands like ls, cd, sudo.
1. Files and Directories
To see all the files in the current directory, type “ls” (short for list). To see what a particular file might be, type “file “, where is the file you want to query. This will display what the system thinks the file is. As mentioned in class, to center a directory, use “cd” command. To go back to parent directory, type “cd ..”. Use “cd ..” several times until you reach “/” (root directory). Have a look at the directories to see what kind of files they contain.
“rm” (short for remove) is used to delete files. Be careful using this command!
A1>> In the root directory, type “ls -lart” and provide, show the command and show the command its output. (1pt)
Note: Linux doesn’t have a trashcan, when you use rm, it is gone gone !
2.su and sudo
Occasionally, you may need to perform some administrative tasks. (To see the difference between normal and administrative users, try to create a directory in the root directory.)
In order to do this, you’ll have to log in as the system administrator (on linux system this is called ‘root’). ‘su ‘ command lets you log in as root from a running shell. Type ‘su’ and enter the root password. This can be dangerous if you forget whether you’re acting as root.
On the other hand, sudo is a command to allow you to perform one task as root. But, to use sudo, your account must be entered into the sudoer file. As root, type “vi /etc/sudoers”, have a look at its content.
If you are not a sudoer, edit the /etc/sudoers file so that it looks like
#User priviledge specification
root ALL=(ALL) ALL
<username> ALL=(ALL) ALL
Instead of “<username>”, type (mr) as a username there. Save the file, and try “sudo” again.
A2>> Run the following command to show that you save the file correctly, show the command its output. (1pt)
cat command can be used to display text files. cat just dumps the output to the terminal,
cat /etc/sudoers | grep “<username>”
NOTE: Replace <username> with mr the username is that you created during the Operating System install.
3. The Help ‘Man’
man is the Linux command to bring up manual pages for commands. As an example, type “man ls” to see the full manual for “ls” command. man is helpful if you forget exactly how to use a particular command, you can type “man “.
A3 >:How would you bring up the manual page for “ps”? (1pt)
A process, also known as a task under Linux, is a running instance of a program. This means that if 5 users on a server are all using the same program, such as vi, then there are 5 vi processes running on the machine, although they all share the same executable code (program text).
The processes on a Linux system can be viewed using “ps” command.
On Linux, you need to type “ps -e” pr “ps -ef” to see processes not attached to you current terminal. The PID column lists the process id number for a process, while TTY shows what the process is attached to (? means that is has no terminal), and last CMD is the name of the program actually running.
The process ID (PID) is a unique identifier for a process.
A4>> :Give examples of at 2 daemons running on your Ubuntu Operating System. (1pt)
5. Hardware Details
A5>> Display Hardware Information of your System. (1pt)
lshw is a small tool to extract detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc.
Provide at least, CPU, Memory and Disk information please.