Familiarity with and mastery of the command-line terminal is important for developers at all skill levels.
You can run the shell commands in this notebook, but we recommend that you open a terminal and type the shell commands directly.
In the notebook file tree, look for the buttons on the upper right and click New > Terminal.
# List files in this folder
ls
# List files with more information
ls -l
# Show help for the ls command
ls --help
# Reveal current folder
pwd
# Change to root folder
cd /
# Autocomplete folder names
# Type cd /home/u and press TAB
# Save text to a file
ls > /tmp/files.txt
# Append text to a file
ls >> /tmp/files.txt
# Show command history
history
# Save command history to a file
history > /tmp/history.txt
Though it has a steep learning curve, we strongly recommend learning a powerful editor called Vim.
# Start the vim editor
# vim
Each Linux distribution has its own package manager. Fedora uses the dnf
package manager.
# Install the git package
# sudo dnf -y install git
You can suspend, resume and stop processes that are taking too long.
# Suspend current process
# Press CTRL-Z
# Resume process in background
# bg
# Resume process in foreground
# fg
# Stop current process
# Press CTRL-C
If you are using the terminal (and not running commands in this notebook), you can take advantage of time-saving keyboard shortcuts.
We often find that people teach each other and learn cool tricks when working together in the same terminal.