I've been learning the linux terminal and I wanted to share what I've figured out along the way with you guys! I got some good feedback about my previous HakTip where I focused on some terminal commands that get you started in Linux, so I decided to branch out a bit and check out some more. Here are some simple commands that will help you get more comfortable starting out in the terminal. Type date or cal and you can see the current time and current calendar month. df is a simple command that will show you free disk space, and free will show you the current free memory amount. Ok, that's cool, but what if you want to do more than just view things?
Well, we've already learned how to show the current directory with 'pwd' and change directories with 'cd'. But here are a few more shortcuts: If you're in your 'home/user' directory, type cd /home or cd .. and they'll take you to the parent directory.
Also, while you're in the home/user directory- if you want to move to a new folder inside the snubs folder, type cd /home/snubs/Documents/ or cd ./Documents, or you can just type cd Documents because the ./ is generally implied as the working directory.
A few other shortcuts having to do with changing the directory- cd - will take you to the previous working directory and cd ~snubs takes me back to my user directory.
After all that, you can type clear to clear out the terminal or exit to close it.
Lets get to listing. The ls command can be used to list files or directories that are found in a certain folder. For example, ls Documents lists all the files in my Documents folder, and ls Documents Pictures will list everything found in both of those folders. You can also add an option like ls -l Documents that'll give you more info about the files found in that directory. Typing ls -lt (giving it two options) will list in long format by modification time.
There are a bunch of other options you can use with each command, these are just a couple. Type ls --help to find all of the other options you can add. Alright! I think that's it for today, but I'll be back in my next HakTip with some more useful tips for Terminal.
How did you learn the terminal? There are lots of handy websites out there that go really into detail about how to use it. Tell me about your favorites in the comments or email me at email@example.com. And be sure to check out our sister show, Hak5 for more great stuff just like this. I'll be there, reminding you to trust your technolust.