Here are some tips to get started with the command line in your FreeBSD jail:
- When you enter your password the cursor will not move (or blink). This is for security reasons, namely that someone looking over your shoulder won’t know how many characters your password is.
- To learn more information about a command run the
manprogram. For example, to learn more about the
cpprogram you can run
man cpto get to know more about it.
- Commands are case sensitive. Make sure to be careful when entering them and pay attention to detail.
- If you get stuck take a screen shot and send it to your instructor for help. Make sure that you explain what you were trying to achieve and what the previous steps were.
- Learn the basic commands that are listed below.
Overview of Commands
Here are some basic commands:
|pwd||prints working directory|
|ls||lists contents of current directory|
|ls –l||lists contents of current directory with extra details|
|cd ~||change directory to your home directory|
|cd name||change directory to
|cd ..||change directory to parent directory (using a relative path)|
|cd /some/path||change directory to
|cd –||change to the previous directory you were in|
|mkdir name||create directory
|rmdir name||remove directory
|touch name||create empty file
|cp file1 file2||copy
|rm file||remove file
|rm –f file||force removal of file
|cp –r dir newdir||copy directory
|rm –rf dir||force removal of directory
|cat file.txt||display the contents of
|more file.txt||display the contents of
|head file.txt||display first 10 lines of
|tail file.txt||display last 10 lines of
|tail –f file.txt||display the contents of
|mv fileordir dir||move
|mv file newname||rename
|top||displays all the processes running on the machine, and shows available resources|
|date||shows the current date and time|
|ctrl-c||kill the running program|