To move a file to a different folder, or to move a folder to a different folder, execute the following terminal command [how?]:
mv file.txt folder
The command above will move a file called file.txt that exists in the current working directory to inside a folder called folder that also exists in the current working directory. See [How to Refer to Files and Folders using the Terminal on Linux Mint] for how to write this filename argument.
Danger: mv will REPLACE the target file if it exists, e.g. if you are moving file.txt to a folder that already contains a file.txt, it will be replaced, and the old file will be effectively deleted. It will not show an error or ask for confirmation! More specifically, mv will replaces the hard link that exists at the target filepath, changing which inode it points to. Consequently, if you have multiple hard links to the same file, mv won't affect the other hard links. Notably, this is different from how the cp command works, which overwrites the inode instead of just replacing the hard link.
Tip: you can move multiple files at once by adding more positional arguments before the last argument (which must be the folder). For example: mv file-1.txt file-2.txt file-3.txt folder will move all three files to the target folder. It's also possible to use Bash expansions and globbing, e.g. mv file-{1,2,3}.txt folder and mv file-*.txt folder.
Tip: mv is also the command for renaming files! You can perform both actions simultaneously, e.g.: mv foo.txt bar/fish.txt will rename foo.txt to fish.txt and move to inside the folder bar. This occurs as a single operation, so it doesn't replace a file called fish.txt that exists in the current working directory, nor a file called foo.txt that exists in the target directory, but it will replace a bar/fish.txt if it exists.
Questions and Answers
What Happens if The Target of mv Already Exists?
If you mv a file to the filepath of an existing file, the file will be overwritten (the hard link will be replaced).
What Happens if The Target of mv is a Symlink?
If the target of mv is a symlink, the symlink itself will be replaced.
mv is a command that operates on the hard links themselves. When the target of mv is a symlink, what that actually means is that there is a hard link (a filepath) to a symlink inode. From this symlink inode we can get which filepath the symlink is symlinking to. The mv command will replace this hard link with a hard link that points to the inode of the file being renamed, effectively deleting the symlink if its hard link count becomes zero.