An ad-free and cookie-free website.
Learn to find a file's type and location at the Linux command line.
Videos can also be accessed from the Linux Essentials Playlist on YouTube.
Linux type Command Summary with Examples (4:02)
Our eleventh word, or command to memorize is
type from the category Help.
type allows you to show a command's
type and location. In our last video we wanted to send output to a file
instead of the screen. So here we'll use the type command to do that.
||Display type and locations|
||Display single word file type|
Before we start, it helps to think of commands as mini programs and
most follow this structure:
command -option(s) argument(s).
type command has
5 options, and arguments you provide are the commands
you're interested in learning about.
Let's discuss three command types: first, the 60 or so bash shell builtins we saw in video 9. Second is a vast group of non-shell commands. Third, are aliases which we will cover in our next video.
To access types, we'll go option-less, and use the
The second capability is to add locations, using the
So why is
type an important command?
type is a nice way to start
your search for help.
And now you know how to do that.
Okay, the best way to embed this in your memory is by typing in your own terminal window.
Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows.
Here we go, start with an easy one,
Ok, it's a builtin. Next, let's pass multiple arguments, from our four previous videos.
Now, up arrow, add the
-t option and
See, shorter types, for the descriptions. Next, let's get command types
and locations using
And last, let's tackle the problem from the last video and create a
file with the same output. Find the command with up arrow, and redirect
output with this symbol
file name and examine.
Okay now you know how to use
And you know the syntax for commands, options and arguments.
One last tip about the
So we touched on alias here but didn't explore it, so tune in for our
next video. Later, we'll also discuss a fourth command type called
Okay, thanks for visiting today. I hope this was a fun introduction
For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:
Like what you see? Subscribe, follow and tell a friend.
catcommand, hit Back.
aliascommand, click Next.
A newly-updated free resource. Connect and refer a friend today.