Score:9

How to permanently turn on "-v" on ubuntu terminal (and how to remove it)

tr flag

I'm going through a video to learn about commands, and I noticed that when the guy inputs a command, most of them have the -v option by default, without him actually inputting -v in the command options.

He mentioned that he enabled "verbose", but I can't seem to find anything online that mentions what I'm looking for. I'm not sure if it is relevant, but I'm on a VM.

Video: https://www.youtube.com/watch?v=ZtqBQ68cfJc&t=5377s

How can I enable this verbose mode?

Score:27
cn flag

You don't. While many commands do use -v for verbose, and this is a common idiom, it isn't a standard and many commands use it for something completely different. For example, the text search command grep uses -v for "negate the match". So while grep foo means "find lines matching foo, the command grep -v foo means "find lines that do not match foo".

So you really don't want to blindly add an option to a command unless you know that command uses the option to do what you think it does. Instead, what you can do is add aliases for the commands you actually want to use. To do that, for example for the command gzip which was mentioned in your video, you edit the file $HOME/.bashrc and add this line:

alias gzip='gzip -v'

Save the file, open a new terminal, and now all your gzip commands become gzip -v.

And, to find out what options a command has and what they do, you run man command. So, for grep, that would be man grep.

LBB188 avatar
tr flag
Thank you, finished alias command and it all makes sense now.
phuclv avatar
sd flag
`-v` is also a common short option for `--version`
user2554330 avatar
bd flag
What about the second part of the question (in the title)? After setting that alias, how to run `gzip` without the `-v`? Do you need a second alias, or is there a way to say "ignore the aliases, just run gzip"?
terdon avatar
cn flag
@user2554330 see [How can I run original command that aliased with same name?](https://askubuntu.com/a/525242)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.