From Wikipedia:
A shell is a user interface for access to an operating system’s services.
The most basic shell is sh.
bash is the most common shell for Linux. It has many more features and is easier to use than sh, and is nearly universal. There are other less common shells too, such as fish (Friendly Interactive SHell) and zsh.
bash features
* represents a wild card.
Also know that . represents the current working directory, while .. represents the parent directory.
Some basic commands were listed in last week’s post. A more comprehensive guide can be found here: https://github.com/twlinux/club/wiki/Basic-UNIX-and-bash-commands.
Basic commands
-
echo Hello world! -
ls DIRdisplays the contents of the directoryDIR. -
cd DIRchanges the current working directory toDIR. -
mkdir DIRcreates a new directory. -
rmdir DIRdeletes an empty directory. -
rm FILEdeletes a file. -
touch FILEcreates a blank file calledFILE. -
catconcatenates the input stream and prints to the output stream. (?)-
cat FILEprints the content ofFILE -
cat > FILEwill write the standard input stream out toFILE. End this command by pressing CTRL-D.
-
-
man COMMANDshows the manual page forCOMMAND. -
sudo COMMANDrunsCOMMANDwith superuser (root) privileges. -
aptis a front-end to the Debian package manager.-
apt updateupdates the package list. -
apt upgradeupdates the packages. -
apt install PACKAGE0, PACKAGE1...installs the packages listed. Must be ran as root. -
apt remove [--purge] PACKAGE0, PACKAGE1...uninstalls the packages. With the optional parameter--purge, all configuration and data files are deleted as well. -
apt autoremoveremoves all orphaned packages (unused dependencies). -
apt search KEYWORDsearches the repository forKEYWORD.
-
Note: Every apt subcommand listed above excluding search must be run as root. sudo apt install...
CTRL-C ususally cancels the foreground command by sending SIGINT or a KeyboardInterrupt.