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. Basic commands
- 4.2.1. A note on command options
- 4.2.2. Getting help with commands
- 4.2.3. Display current date and time:
date
- 4.2.4. Change directory:
cd
- 4.2.5. Create new directory:
mkdir
- 4.2.6. Remove empty directory:
rmdir
- 4.2.7. List files and directories:
ls
- 4.2.8. Copy files and directories:
cp
- 4.2.9. Display file contents or combine files:
cat
- 4.2.10. View file contents:
less
- 4.2.11. Print first few lines in a file:
head
- 4.2.12. Print last few lines in a file:
tail
- 4.2.13. Move (rename) a file or directory:
mv
- 4.2.14. Remove files or directories:
rm
- 4.2.15. Display text or values of variables:
echo
- 4.2.16. View free disk space:
df
- 4.2.17. View disk space usage of files or directories:
du
- 4.2.18. View memory (RAM) usage:
free
- 4.2.19. Search for files:
find
- 4.2.20. Find files using their file names:
locate
- 4.2.21. Locate a command:
which
- 4.3. Editing text files using nano
- 4.4. Exercise: Run a local BLAST+ database search
- 4.5. Points to note