If you can see this check that

Main Page

Essential Basic Caine


Essentials

User:
Password:

Objectives

To reset all the check buttons from a previous attempt click here

Question 1: Access

To access Caine you need to start the image (select the most up to date Caine available). You then need to log into the image remotely using a variety of methods. You should try to use telnet or ssh, plus the graphical interface VNC. You need to have either ssh installed (e.g. putty.exe) or use the JavaScript ssh. Note putty can only be used if you have a unique public IP, so if you are sharing behind a NAT you must stick with the JavaScript interfaces.

On some highly secured networks, you may not be able to use ssh, but give all of the methods a go and try to get both a command prompt "terminal" interface and VNC working.

The username is "caine" and the password is "caine".
The terminal is started within the graphical interface by clicking on the terminal icon at the bottom of the screen.

Tests - not attempted
Running a terminal in VNC UNTESTED
Running a non-vnc connection (ssh/telnet) UNTESTED

Question 2: Create and Navigate Directories

The "cd" command changes your current directory. On its own it changes it to your HOME directory, otherwise you need to specify a parameter which either is an absolute directory (such as cd /home) or a relative directory (such as cd dir1 which takes you to dir1 in your current working directory).

Type

cd
pwd
This will take you to your home directory and then Print Working Directory.

What is your current working directory? :

Tests - not attempted
Correct cwd UNTESTED

Make three directories in your HOME directory. Name these directories "mydir", "data", and "images".

Tests - not attempted
Three directories created UNTESTED

Change your working directory into "data". Create two more directories in /home/caine/data called "dir1" and "dir2". If you create them in the wrong place delete them using "rmdir".

Tests - not attempted
Two directories created UNTESTED
Not accidentally created in HOME UNTESTED

Change directory into dir2.

What is your current working directory? :

Tests - not attempted
Correct cwd UNTESTED

Change your current working directory to /home/caine. You can either "cd /home/caine" or "cd ..", as ".." means the directory above the current directory in your directory tree. Check with pwd to make sure you are in the right directory. Then try to delete the data directory using "rmdir data". What message to you get back?

Tests - not attempted
Error message displayed UNTESTED

Use the more powerful and dangerous command

rm -rf data
This deletes all files and directories in the data directory, including the data directory itself. Obviously getting the parameter wrong means you can lose a lot of stuff in one go!

Tests - not attempted
Two directories left... UNTESTED

Question 3: The ls command

The "ls" command on its own shows you the contents of the current working directory. However it can also take a number of useful parameters.

Filenames which begin with a "." character do not usually appear when you use "ls". These are called "hidden" files, and they are used for things like application configuration and some GUI state information. They are rarely needed so this is the reason they are hidden from normal "ls".

Use the option "-a" to see the hidden files. View the hidden files in your HOME directory. The file list starts with "." (which is a directory that you can use to describe the current directory in commands) and ".." (which describes the directory above this one in the tree).

What is the first file (in alphabetical order) which appears when you use "-a" in your HOME directory, other than "." and "..". :

Tests - not attempted
Third file when using -a UNTESTED

Use the "-l" option to see a long listing of a file. Get a long listing of "/etc/passwd" and identify its size in bytes. :

Tests - not attempted
Size of /etc/passwd UNTESTED

Question 4: Relative and Absolute

Demonstrate your understanding of relative, absolute, and the use of ".." and "/" and "." in the "cd" command by answering these questions. Try to answer them in your own head, and use the command line only if you are confused. Remember paths beginning with "/" are relative to the top level directory, whereas others are relative to the current directory. ".." takes you up a directory, and things can be seperated with "/" such as "../.." taking you up 2 directories. "." indicates the current directory, and is really only useful where you really need to specify a parameter but you mean to say the current directory. Always supply the SHORTEST solution, remember the answers are CASE SENSITIVE, and if you type spaces in an answerbox where no space should be entered then it will be marked incorrectly.

Consider these commands:

cd /usr/share/doc
cd ..
pwd
What is the current directory:

Tests - not attempted
Correct cwd UNTESTED

Consider these commands:

cd /usr/share
cd vim
pwd
What is the current directory:

Tests - not attempted
Correct cwd UNTESTED

Consider these commands:

cd /usr
cd lib
cd xorg
pwd
What is the current directory:

Tests - not attempted
Correct cwd UNTESTED

Consider these commands:

cd
cd ../.. 
pwd
What is the current directory:

Tests - not attempted
Correct cwd UNTESTED

Consider these commands:

cd
cd ../caine
pwd
What is the current directory:

Tests - not attempted
Correct cwd UNTESTED

Consider these commands:

cd /usr/share
cd vim/../../lib/xorg
pwd
What is the current directory:

Tests - not attempted
Correct cwd UNTESTED

Consider these commands:

cd /usr/share
cd /etc/vim
cd ..
pwd
What is the current directory:

Tests - not attempted
Correct cwd UNTESTED

Consider these commands:

cd 
cd ../../usr/share/doc
pwd
What is the current directory:

Tests - not attempted
Correct cwd UNTESTED

Consider these commands and fill in the blank:

cd
cd ../
pwd
Where the "pwd" command prints "/usr/local/lib".
Note this is an example of a RELATIVE pathname parameter to cd, as the parameter does not start with a "/".

Tests - not attempted
Correct blank UNTESTED

Consider these commands and fill in the blank:

cd /usr/share/doc
cd /
cd caine
pwd
Where the "pwd" command prints "/home/caine"
Note this is an example of an ABSOLUTE pathname parameter to cd, as the parameter starts with a "/".

Tests - not attempted
Correct cwd UNTESTED

Consider these commands and fill in the correct blank using a RELATIVE pathname. It should be the SHORTEST possible solution.

cd /usr/share/python
cd 
pwd
Where the "pwd" command prints "/usr/share/perl5/Encode".

Tests - not attempted
Correct cwd UNTESTED

Consider these commands and fill in the correct blank using a RELATIVE pathname. It should be the SHORTEST possible solution.

cd /usr/share/perl
cd 
pwd
Where the "pwd" command prints "/etc"

Tests - not attempted
Correct cwd UNTESTED

Consider these commands and fill in the correct blank using a RELATIVE pathname. It should be the SHORTEST possible solution.

cd /etc
cd 
pwd
Where the "pwd" command prints "/etc"

Tests - not attempted
Correct cwd UNTESTED


Centos 7 intro: Paths | BasicShell | Search
Linux tutorials: intro1 intro2 wildcard permission pipe vi essential admin net SELinux1 SELinux2 fwall DNS diag Apache1 Apache2 log Mail
Caine 10.0: Essentials | Basic | Search | Acquisition | SysIntro | grep | MBR | GPT | FAT | NTFS | FRMeta | FRTools | Browser | Mock Exam |
CPD: Cygwin | Paths | Files and head/tail | Find and regex | Sort | Log Analysis
Kali: 1a | 1b | 1c | 2 | 3 | 4a | 4b | 5 | 6 | 7a | 8a | 8b | 9 | 10 |
Kali 2020-4: 1a | 1b | 1c | 2 | 3 | 4a | 4b | 5 | 6 | 7 | 8a | 8b | 9 | 10 |
Useful: Quiz | Forums | Privacy Policy | Terms and Conditions

Linuxzoo created by Gordon Russell.
@ Copyright 2004-2023 Edinburgh Napier University