Each time we launch the terminal application, it creates a new session. The session immediately loads settings and preferences that make up the command line environment.
We can configure the environment to support the commands and programs we create. This enables us to customize greetings and create nicknames (aliases) for commands, and create variables to share across commands and programs.
You can reference the filesystem for this lesson with this diagram.
In this first exercise, let’s pull up a basic command line text editor called nano. Follow the steps below to create and save your first file in the terminal.
Note: If you are having trouble in nano and need to exit, use Ctrl + C.
In the terminal, type:
This will open the nano text editor.
In nano, at the top of the window, type:
"Hello, I am nano."
Using the menu at the bottom of the terminal for reference, type Ctrl + O (the letter, not zero) to save the file. The keys are not case-sensitive, so don’t worry about capitalizing.
Press Enter, when prompted about the filename to write.
Then type Ctrl + X to exit nano.
to confirm that there are now contents in hello.txt.