4. Using the command line#
In this section, you will find an overview of the Linux command line, the shell and terminal programs, some commonly used commands, and a sample exercise.
- 4.1. Shell and Terminal
- 4.2. An overview of commands
- 4.2.1. Command options
- 4.2.2. Getting help on using commands
- 4.2.3.
date
— display current date and time - 4.2.4.
cd
— change directory - 4.2.5.
mkdir
— create new directory - 4.2.6.
rmdir
— remove empty directory - 4.2.7.
ls
— list files - 4.2.8.
cp
— copy files - 4.2.9.
cat
— display contents of files or combine them - 4.2.10.
less
— view and navigate file contents - 4.2.11.
head
— print first few lines of a file - 4.2.12.
tail
— print last few lines of a file - 4.2.13.
mv
— move a file or directory - 4.2.14.
rm
— remove files or directories - 4.2.15.
echo
— display text or values of variables
- 4.3. Other useful commands
- 4.4. Editing text files using nano
- 4.5. Exercise — using the command-line
- 4.6. Notes