Questions tagged [command-line]

This tag is for questions that are about using the command-line interface (CLI), including the use of standard command-line tools and shell commands. However, for questions that are specific to each shell (like Bash, ZSH etc.), use the tag of that particular shell as well.

What Questions Should Have This Tag?

  • How do I do this via command line?
  • Basic Command Line commands
  • Shell Specific commands (use shell specific tag as well)

Basic Definitions:

Command Line Interface is a way of interacting with the system and software by typing text commands into a terminal (or terminal emulator).


The command-line is also known as

  • Console
  • Terminal
  • Command prompt
  • Shell (however, be aware that applications other than the shell can have their own command line interface)

Brief Introduction to the Subject:

"Under Linux there are GUIs (graphical user interfaces), where you can point and click and drag, and hopefully get work done without first reading lots of documentation. The traditional Unix environment is a CLI (command line interface), where you type commands to tell the computer what to do. That is faster and more powerful, but requires finding out what the commands are."

from man intro(1)

Some users prefer using the command line for some tasks because it saves them time and effort. They also benefit from being able to create scripts to automate common tasks, and they can use the command line to configure their operating system on a very low level to exactly fit their needs.


Important Links for Learning More:

Questions using this tag might be related to Bash - the default command line shell in Ubuntu, Shell-Scripting and Programming.

22928 questions
18
votes
2 answers

How can I safely shut down Xfce from the terminal?

I'm not looking for shutdown or reboot or the like. I want to know how to shut down Xubuntu from the terminal, by executing a command that would have the same effect as clicking the "Shutdown" button in a menu. Similar to this question , but for…
18
votes
4 answers

Reading and writing a file: tee command

It is well known that a command like this: cat filename | some_sed_command >filename erases file filename, as the output redirection, being executed before the command, causes filename to be truncated. One could solve the issue in the following way:…
18
votes
2 answers

Can no longer use CTRL+Left/Right in Bash Terminal

I usually use CTRL + Left and CTRL + Right to navigate between words on the command-line. I switched my laptop on this morning and can no longer do that. Instead, the CTRL + Left input code gets printed in the terminal. Ie: Here's my output when I…
Juicy
  • 935
18
votes
6 answers

How to install termite

I'm using openbox on UbuntuGnome .. if that helps. So I reviewed the documentation located here: https://wiki.archlinux.org/index.php/Termite and I can't figure out how to install it. I'm very novice and would just like a simple explanation is…
Pepe
  • 1,018
18
votes
7 answers

Convert pdf to monochrome black-and-white via command line

I have a 65-page PDF file that has text in a dark grey. (Actual text, not a picture/image of text.) Printing on my B/W printer, the text gets all blurry, because the printer is trying to make it less than black. I can solve this problem…
Earthliŋ
  • 661
  • 2
  • 11
  • 29
18
votes
8 answers

CLAMAV not working

After installation of CLAMAV and try to scan I see this error. How do I solve this? $ clamscan scan LibClamAV Error: cli_loaddbdir(): No supported database files found in /var/lib/clamav ERROR: Can't open file or directory ----------- SCAN SUMMARY…
18
votes
3 answers

Command to determine whether Ubuntu is running in a virtual machine?

Is there a command or tool that can be used to determine whether Ubuntu is running as a guest within a virtualization program such as VirtualBox or Qemu or whether it is running on the bare metal?
Nathan Osman
  • 32,603
18
votes
4 answers

How to create a new folder from a terminal with administrative permissions?

I want to install JAVA, but the installation instructions ask me to create a new folder, called /java/ , into the standard /usr/ folder. But this folder is blocked. I mean, I can not to create a new folder on it, with the PCManFM file manager,…
Juan
  • 1,955
18
votes
4 answers

mkdir with date name?

In Linux shell, am I able to create a directory but the name would be a string returned from another program? And if I am able, how to? In particular I am asked to create a new directory in my Home, and its name would be the minute on my computer's…
Mr T
  • 333
18
votes
1 answer

How do I sort the output of "ls" by last modified - including the date?

So the output would be either: Most recent at the top OR most recent at the bottom - giving the times when the contents of the working directory were modified ? Apparently, ls -t is supposed to give most recent at the top, which it does... But I…
TellMeWhy
  • 18,154
  • 44
  • 102
  • 143
18
votes
1 answer

Why is there an inconsistency in base64 output?

I am using the java based neo4j graph database on lubuntu 15.04. The neo4j HTTP authentication header uses base64 encoding of 'username:password' (not including quotes). Using wireshark I can see the base64 code generated by neo4j. However if I use…
Lozdown
  • 183
18
votes
2 answers

Is there an easy way to log all activity that a shell script does?

Is there an easy way to log all activity that occurs from a shell script to a file? I have a script. It outputs things like echo "instructions", as well as other program output. I know the commands: command | tee -a "$log_file" and command >>…
j0h
  • 15,531
18
votes
2 answers

How Do I Setup Microsoft Visual Studio Code as a Default Editor?

Microsoft Visual Studio Code is a really nice editor and I would like to make it my default normal (not terminal) text-editor over Gedit, Emacs, or Vim. (I know, I'm so evil.) There's no way for me to add it via a GUI option and I've looked at…
Ryan
  • 283
18
votes
1 answer

How to print the output of tree to pdf without losing the color?

I use the following command to print a directory structure to a file: tree -h somepath/ > tree_of_somepath.txt tree gives a nice colorized output on the terminal, but as expected this cannot be redirected to a text file. I would like to print the…
Bruni
  • 11,449
18
votes
5 answers

Ubuntu 14.04: New user created from command line has missing features

I am trying to create a new user in Ubuntu 14.04 LTS from the bash command line. I use the following commands: sudo useradd -c "Samwise the Brave" sam sudo passwd sam Enter new UNIX password: hello-1234 Retype new UNIX password: hello-1234 passwd:…
martin_0004
  • 1,063
  • 5
  • 13
  • 20
1 2 3
…
99
100