List Files of the Current Working Directory
To list the files of the of the current working directory, the simplest although incomplete method is to execute the following terminal command [how?]:
ls
This will list all files in the current working directory, except the dotfiles. Just like how some file managers treat dotfiles like hidden files, the ls command also hides them by default.

ls command and its output on Linux Mint.Observe that the output matches what you would see in the file manager.

What do the Colors in ls Mean?
By default, ls on Linux Mint is aliased to ls --color=auto, which prints colored output. The exact colors used depends on the configuration of the terminal and the $LS_COLORS environment variable. Some of them are:
- Blue for folders.
- Purple for image and video files.
- Green for executable files (with
xpermission). - White for other files.
- Cyan for symlinks.
- Red for dangling symlinks (when the target doesn't exist).
- Yellow for devices (on
/dev).
See [https://askubuntu.com/questions/17299/what-do-the-different-colors-mean-in-ls] (accessed 2025-03-15) for a more complete answer.
List All Files Including Dotfiles
To list all files INCLUDING the dotfiles, we use the --all argument, or the -a flag.
ls --all
ls -a
Either of the commands above will list the files including the dotfiles. The options -A (--almost-all) will skip printing . and .. which otherwise will appear on every directory.
List Files of a Specific Directory
The first non-optional argument we pass ls can be a filepath to a directory we want to list the files of, in case we don't want to list files from the current working directory.
ls ~/Downloads
Above, ls will list the files of ~/Downloads instead of of the current working directory.
List Only Files of a Directory, Not Folders
There is a terminal command to list only the files of a directory, but it's not perfect. On Linux, something inside a directory can be a file, a directory, or a symlink, and a symlink may be a symlink to a file or to a directory. There is no way to know what the symlink points to without resolving it, and in general commands don't resolve them, they just list them.
We can make ls display a / after directories with the -p flag. We can then filter them out using grep and the -v (--invert-match) option. This will remove the directories from the list, but not the symlinks, so it's not perfect. For example:
ls -p | grep -v /
List Files with More Information
It's possible to view more information about the files in a folder using the -l option, which is for long listing format. This format looks like this:
drwxr-xr-x 4 john john 4096 Mar 7 21:33 Pictures
Let's understand what these columns mean.
1: the first character is - for files, l for symlinks, and d for directories. Then a RWX triplet.
2: the number counts how many hard links the inode has. If you don't use this feature, this number should always be 1 for files. For folders (which you shouldn't be able to hard link), the number may seem random, but there is actually some logic in it!
Every folder has a hard link to all of its subfolders. Every folder also has a hard link to itself (.). Every folder also has a hard link to its parent folder (..). This means the number of hard links a folder has is 2 plus the number of subfolders it contains!
3: this is the user that owns the file.
4: this is the group associated with the file. This is identical because when you create a user a group is created with the same name.
5: this is the file size: 4096 bytes. This number will be a multiple of the block size of the disk, e.g. 4096 bytes, then 8192 bytes, and so on. This increases linearly for a small number of blocks (around ten), until the inode runs out of direct pointers to blocks. Then it must use indirect pointers which have an overhead.
6: this is the modification date of the file. You can also access this using stat filename.txt.
7: the filename of the file, surrounded by single quote characters if it contains space characters.