Etc : Bash - cd, mkdir
Using Mate's Terminal is a more pleasant experience than using Windows Cmd, it has a Profile that you can customise and a Tab Feature that allows you to open multiple terminals in the same window.
Want to read a man page ... open a new tab File»Open Tab or use the Shortcut Key Ctrl+Shift+T and do a man whichever_command from there. When you find what options to use, go back to the first tab by Clicking on its title or better still Alt+1 and then run the command. Need more info, back to the man page, Alt+2.

When you are finished with a tab Ctrl+D will close it, another Ctrl+D will close the next tab or if no other tabs are open will close the Terminal Window.
Lets Browse the File System...
To move between directories on a Linux file system we use the cd
command Change Directory so to move into the Documents Folder type in cd
then type in Do
and then hit the Tab key to see what directories start with Do.
Mark is a new user to this laptop, my own files are a mess so best not inflict that on you. Also no more screen shots, I'll just copy the commands and the results and paste them into a box, scroll to your right if the content is cut off.
mark@Debian10:~$ ls -F (No colour so -F will indicate Directories) Desktop/ Documents/ Downloads/ Music/ Pictures/ Public/ Templates/ Videos/ mark@Debian10:~$ cd Do (Hit the Tab Key to see Directories beginning with Do) Documents/ Downloads/ mark@Debian10:~$ cd Documents/ (Type in c and hit the tab key to complete) mark@Debian10:~/Documents$
Make use of Tab Completion on both the Commands and the File/Directories names. Now to create a directory (folder) using the mkdir
command and move there so that I don't mess up marks file system :-).
mark@Debian10:~/Documents$ mkdir sandbox mark@Debian10:~/Documents$ cd sandbox
Now to create a directory FourSeasons and a sub-directory Spring at the same time.
mark@Debian10:~/Documents/sandbox$ mkdir FourSeasons/spring mkdir: cannot create directory ‘FourSeasons/spring’: No such file or directory
The man page for mkdir is short and there is one really useful option:
-p, --parents no error if existing, make parent directories as needed.
mark@Debian10:~/Documents/sandbox$ mkdir FourSeasons/spring -p mark@Debian10:~/Documents/sandbox$ ls -R (to show all in sandbox) .: FourSeasons ./FourSeasons: spring ./FourSeasons/spring:
Moving into FourSeasons, it's easy to create a number of directories at the same time, just keep a space between each name.
mark@Debian10:~/Documents/sandbox$ cd FourSeasons/ mark@Debian10:~/Documents/sandbox/FourSeasons$ mkdir summer autumn winter mark@Debian10:~/Documents/sandbox/FourSeasons$ ls -RF .: autumn/ spring/ summer/ winter/ ./autumn: ./spring: ./summer: ./winter:
Now we have four empty directories in FourSeasons, later I will put files into them, for now lets practice jumping from one directory to another using cd..
, ( ..
refers to the parent directory, remember the ..
listing when you do an ls -la
.)
To bop into Spring and then jump from Spring to Summer....
mark@Debian10:~/Documents/sandbox/FourSeasons$ cd spring/ mark@Debian10:~/Documents/sandbox/FourSeasons/spring$ cd summer -bash: cd: summer: No such file or directory mark@Debian10:~/Documents/sandbox/FourSeasons/spring$ cd ../summer/ (move up to the parent directory and then down to summer) mark@Debian10:~/Documents/sandbox/FourSeasons/summer$ cd ../autumn/ mark@Debian10:~/Documents/sandbox/FourSeasons/autumn$ cd ../winter/ mark@Debian10:~/Documents/sandbox/FourSeasons/winter$
To get from winter back up to Documents
mark@Debian10:~/Documents/sandbox/FourSeasons/spring$ cd ../../.. (moving up three directories FourSeasons then sandbox then Documents) mark@Debian10:~/Documents$ cd .. mark@Debian10:~$ pwd /home/mark mark@Debian10:~$ cd .. (moving up to where a normal user should not be.) mark@Debian10:/home$ cd .. mark@Debian10:/$ pwd / (/ aka root is the top most level of the file system, GO HOME.) mark@Debian10:/$ cd (a cd without any directory reference will bring you home!!) mark@Debian10:~$ pwd /home/mark
Play around with cd
and try out ~
(Shift key + Hash Key) that means the home directory, like being in autumn and want to bop to Downloads ASAP..
mark@Debian10:~/Documents/sandbox/FourSeasons/autumn$ cd ~/Do(using the tab key) Documents/ Downloads/ mark@Debian10:~/Documents/sandbox/FourSeasons/autumn$ cd ~/Downloads/ mark@Debian10:~/Downloads$ ls bionicpup32-8.0-uefi.iso slacko-6.3.2-uefi.iso.md5.txt bionicpup32-8.0-uefi.iso.md5.txt tahr-6.0.5.iso bionicpup32-8.0-uefi.iso.txt tahr-6.0.5_PAE.iso.md5.txt fourPuppyISO.md5.txt xenialpup-7.5-uefi.iso slacko-6.3.2-uefi.iso 'xenialpup-7.5-uefi.iso.md5&sha256.txt'
Normally you use your desktop file manager to see the contents of your folders, but there are many reasons to use the terminal especially when it comes to setting up your pc, so if you want a quick gear change check out these Linux Commands: wget to download Linux ISO's, md5sum to check the downloaded ISO and gpg to make sure they are legit.
Then if you are REALLY CAREFUL use dd to burn that image to your USB key!!!