Shell
What is the shell
- Shell is a textual interface to the computers, it can help you take full advantage of the tools your computer provides.
This lecture uses bash.
Using the shell
root@VM5014-TheMissingSemesterPra:~#
root@VM5014-TheMissingSemesterPra: your machine.~: the current working directory ( short for your personnal directory ).#: the seperator, after which is your command.
:::info command:
date: print the current date and timeecho: print its argumentwhich: find out which file is executed for the given program name :::Navigating in the shell
- A path that starts with
/called absolute path, any other path is a _relative _path. /: the “root” of the file system..: refers to the current directory...: refers to.‘s parent directory. :::info command:
pwd: print the absolute path of the current directory.cd: change directory.ls: see what lives in the given directory.-l: use a long listing format ( with more information ). :::root@VM5014-TheMissingSemesterPra:~# ls -l 总用量 4 drwxr-xr-x 2 root root 4096 9月 13 16:43 immelon
dmeans this is a directory,rwxindicates the permissions of owner of the file ( root ),r-xindicates the owner group ( root,-means “none” ), the endingr-xmeans everyone else. :::info command:
mv: to move / rename a file.cp: to copy a file.mkdir: to make a directory. :::
