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.

Filter by
Sorted by
Tagged with
28 votes
3 answers
16k views

Terminal shows > after entering \

When I press backslash \, I’m given a > (greater than) symbol. What does this mean?
Curiouskangaroo's user avatar
28 votes
3 answers
96k views

Show recent modified/created files using Terminal

Is there any command to display the recently modified/created files? Which one...?
Ionică Bizău's user avatar
28 votes
2 answers
47k views

Commandline tool for viewing xls files

Is there a commandline tool for viewing/opening excel (.xls) files? So the answer works great unless the worksheets don't have a custom name. When I try to open the file, I get: Traceback (most ...
David Oneill's user avatar
  • 12.1k
28 votes
7 answers
254k views

How to open a directory/folder and a URL through Terminal

I can navigate my files quite fast through terminal. Faster than double clicking... open... look, double click... etc. How do I open a directory in the Ubuntu GUI? For example: cd projects {some cmd}...
Oscar Godson's user avatar
  • 1,675
27 votes
8 answers
5k views

How to make super-user permissions last longer than using sudo?

Is there a way through which I can make the sudo command give me permissions for a longer period than its default time? It can be a pain having to keep entering the sudo password, when requiring the ...
TellMeWhy's user avatar
  • 17.5k
27 votes
7 answers
101k views

Checking version of nodejs returns nothing

I'm trying to install node js onto Ubuntu so that I can run AngularJS. I'm not sure if I've installed it before so I ran sudo-apt get install node and once that is done I then run node --...
thank_you's user avatar
  • 667
27 votes
8 answers
15k views

Dynamic line wrapping in the GNOME Terminal

How can you get the lines in the GNOME Terminal to wrap dynamically when you resize the window?
Marius Butuc's user avatar
  • 4,801
27 votes
4 answers
91k views

What does the '|' (vertical bar) character mean in a Terminal command? [duplicate]

Example: In a Terminal command xdpyinfo | grep resolution (that I have taken from an answer), does the | character mean that the xdpyinfo output shall be sent to the grep program input for printing a ...
Tomáš Pečený's user avatar
27 votes
4 answers
16k views

What does ~$ stand for?

What does ~$ stand for? For example: user@ubuntu:~$ So far I know that the $ sign is a symbol for a regular user. If I'm not mistaken root have # at the end. I also found a lot of commands in the ...
FEarBG's user avatar
  • 273
26 votes
2 answers
64k views

how to access my Android phone from my terminal?

I plugged my Kit-kat android phone up to my Ubuntu 14.04 computer and I enter the terminal and I want to be able to access files on my phone like the media and music folders through the terminal... is ...
cmehmen's user avatar
  • 899
26 votes
2 answers
8k views

Why is my function not re-evaluated in PS1?

I'm trying to have a part of my prompt set dynamically by a function, so in my .bashrc I have: asdf () { echo -n $(pwd) } PS1="\u@\h:\w $(asdf)\$ " Opening a shell gives me what I expect at ...
darthbith's user avatar
  • 374
26 votes
6 answers
196k views

How do I type on the next line in the Terminal?

I am using Ubuntu 12.10 and want to run a set of commands in the terminal, and from what i see in the instructions, these commands each start on a new line. I don't know how to do this in the terminal....
Debbie Poole's user avatar
26 votes
4 answers
18k views

How to pause/resume transfer of large files?

I recently had to copy about 20 GB of data split between about 20 files from my laptop to an external hard drive. Since this operation takes quite a while (at ~560kb/s), I was wondering if there was ...
Olivier Lalonde's user avatar
25 votes
5 answers
35k views

Is it possible to install Firefox on Ubuntu with no desktop enviroment?

I want to install firefox on a Ubuntu server that currently has no graphical desktop environment. Is it possible to install some minimal display management tools that will allow me to launch graphical ...
deimos's user avatar
  • 721
25 votes
1 answer
83k views

zip multiple folders into a zip file using terminal [duplicate]

I wish to store a few folders in a zip file and then convert that zip file into a jar. I have the following folders : META-INF and org. I tried the following command: zip META-INF/ org/ wordcount....
Vineet Kaushik's user avatar
24 votes
2 answers
25k views

How to check using the command line which display manager is running?

How can I determine the name of the display manager in use solely by using the command line?
Abdul Al Hazred's user avatar
24 votes
1 answer
19k views

How can I download an HTML webpage including JavaScript-generated content from the terminal?

On Google Chrome, when we go to the development mode, right-click an HTML element → Copy → Copy element, we can copy the HTML content of a webpage. Below is an example of the procedure I've described: ...
raylight's user avatar
  • 493
24 votes
3 answers
78k views

How to find the attached devices UUID through terminal?

Is there any other method to find all the attached devices UUID through terminal(other than using the blkidcommand ?
Avinash Raj's user avatar
  • 78.5k
24 votes
1 answer
128k views

Delete Files Older Than One year on Linux

By the time, many files are still on my system and I don't need them anymore, so how to delete all files that are one year old at least?
user avatar
24 votes
2 answers
49k views

How to open the additional drivers window using command line

How can I launch the additional drivers window from the command line?
dodohjk's user avatar
  • 1,481
24 votes
8 answers
169k views

How to setup a static IP for network-manager in Virtual Box on Ubuntu Server

Hi there is anyone familiar with the non-gui version of ubuntus network Manager? I'd like to set up a static IP with it in virtualbox without touching the file /etc/network/interfaces. IP: 192.168....
Josh's user avatar
  • 1,440
24 votes
3 answers
14k views

Automatically change Terminal colors on remote connection?

Is there a way to automatically apply a terminal profile when connected to a remote machine via SSH? I'd like more obvious visual cues that I'm connected to a remote machine than the user/host ...
Jeremy Kauffman's user avatar
24 votes
3 answers
37k views

Stuck in terminal at Configuring Secure Boot

I am on Ubuntu 18. I was trying to install amd drivers. A Configuring Secure Boot screen appeared in terminal and I am stuck on it. Clicking ok does nothing, pressing enter does nothing.. what do I ...
Hayk Safaryan's user avatar
24 votes
4 answers
228k views

How do you open a command line?

How do you access the command line or run option to put the commands into the system?
dennis drake's user avatar
24 votes
0 answers
164k views

Using Terminal as a web browser [duplicate]

I've found that terminal can be used for various purposes. This will be great if I can use it as a web browser. Is there any way to use it as a web browser??
opu 웃's user avatar
  • 2,137
24 votes
3 answers
89k views

Using grep to search texts with single quote?

I am using gedit text editor with embedded terminal in ubuntu 12.04. I'm trying to search for some text using grep. I want to search for this line of code 'type' => 'select' I tried: grep -r '\'...
newuser's user avatar
  • 1,321
24 votes
5 answers
64k views

How to truncate all logfiles?

can anybody give me a solution to truncate all logfile in /var/log/ directory? and a question just for knowledge, is it a good idea or not? #!/bin/bash LOGDIR="/var/log" for logfile in $(ls $LOGDIR/*...
pylover's user avatar
  • 2,325
23 votes
5 answers
6k views

CLI mounting vs. GUI mounting

On Ubuntu 12.10, when I want to mount a hard drive, I can just click on the unmounted drive and everything works fine (by mounting to /media/username/partitionlabel). Basically, I would like to do ...
NicApicella's user avatar
23 votes
5 answers
68k views

How to replace a string on the 5th line of multiple text files?

I want to replace the 5th line of multiple text files (file1.txt,file2.txt,file3.txt,file4.txt) with the string " Good Morning " using a single terminal command. All the text files are located on my ~...
Avinash Raj's user avatar
  • 78.5k
22 votes
4 answers
20k views

How to find all images with a certain pixel size using command line?

I am trying to find all JPG images within a folder with subfolders that have either width or height below 300px. This way I want to detect old thumbnails and delete them. For sure I can find all ...
mcbetz's user avatar
  • 3,059
21 votes
3 answers
19k views

How to create a keyboard shortcut for a terminal command

I often work with git and loved iTerm2 for the ability to set keyboard shortcuts for commands. For example, I set CTRL+ENTER to git status. Is this possible with gnome-terminal or can you recommend ...
mniess's user avatar
  • 10.5k
21 votes
5 answers
54k views

How to find all PDF files in directories and their subdirectories?

I want to list all PDF files in the directories of the current working directory. What command can do this? I remember a combination of ls and */*.pdf but don't remember what exact combination.
ashim's user avatar
  • 485
21 votes
3 answers
124k views

Show CPU usage using a command [duplicate]

I want to see CPU usage. I used this command : top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1}' But it returns 100%. What's the correct ...
Morteza Soltanabadiyan's user avatar
21 votes
4 answers
155k views

How do I install Psiphon on Ubuntu 14.04 LTS (Step by Step)

I have tried using Psiphon through Wine but it didn't work. Please tell me how I can install it using terminal step-by-step.
Rahul Raj Rai's user avatar
21 votes
1 answer
13k views

Bash Tab Completion: '-bash: unexpected EOF while looking for matching `)' -bash: syntax error: unexpected end of file

I'm trying to go into an irb session with specific environment variables from a file with this command: $ env $(cat env.sh) irb But when I try press Tab after I type env. to complete it, I get this ...
eldosoa's user avatar
  • 745
21 votes
2 answers
42k views

How can I see a history of the terminal output, not just commands entered?

I'm trying to do some debugging in Android and I am running a live logcat in the Terminal, but the problem is that there is too much information generated so that when I am finished and try to copy ...
coversnail's user avatar
  • 6,366
21 votes
4 answers
8k views

Is this command to remove old kernels safe to use?

While browsing the internet for Ubuntu articles, I came across this command: sudo dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/...
BhaveshDiwan's user avatar
21 votes
6 answers
134k views

How to check crc of a file?

I was looking this question and appears everything but crc. Is there a good Ubuntu way around there to do this?
Alter Lagos's user avatar
  • 1,159
21 votes
2 answers
10k views

Redirect real webcam to a virtual webcam via terminal

Is there a way to redirect a real webcam to a virtual webcam from the command line, for example using the v4l2loopback module with ffmpeg ? Details I have an old webcam which works with most software (...
GeekInDisguise's user avatar
21 votes
4 answers
30k views

Prepend current git branch in terminal [duplicate]

How can I configure the terminal to display the current git branch? I'd like to see the second line rather than the first: andy@bob:~/my_projects/project_x$ (master)~/my_projects/project_x$ I don'...
hayd's user avatar
  • 2,387
21 votes
4 answers
10k views

Reading lines from a text file and creating a text file for each name on each line

Let's say I have a text file like: john george james stewert with every name on a separate line. I want to read the lines of this text file and create a text file for each name, like: john.txt, ...
levato's user avatar
  • 213
21 votes
2 answers
42k views

What's the difference between ` cp ` and ` rsync `? [closed]

They seem similar to me. I want to know how to use them. What's the difference in structure?
Thái Siu Nhưn's user avatar
21 votes
3 answers
113k views

Mounting Disk Image in Raw format

While trying to mount a disk image in Raw(dd) format using the following command mount nps-2010-emails.dd /media/manu/ I get the following error message mount: you must specify the filesystem ...
spaceman_spiff's user avatar
21 votes
5 answers
83k views

How to determine hardware?

Is there a command to detect the type of processor, type of graphics card, type of hard drive, just the basic hardware my computer is running? I'm running 12.04.
TerNovi's user avatar
  • 407
21 votes
4 answers
46k views

How to log memory and cpu usage of an application?

Similar to question How to log CPU load?, I would like to log memory of a process. The process I want to log, is killed on a remote server, and I want to find out the CPU load and the memory usage ...
Framester's user avatar
  • 455
20 votes
3 answers
4k views

What does 'apt-get install update' do?

I saw this snippet in some installation instructions: $ apt-get install update I know what apt-get install XXXX does and I know what apt-get update does, but I can't find any info on what this ...
Zweih's user avatar
  • 329
20 votes
8 answers
24k views

remove file but exclude all files in a list

I need to cleanup a folder periodically. I get a filelist which contains text, which files are allowed. Now I have to delete all files which are not in this file. Example: dont-delete.txt: ...
stefan83's user avatar
  • 333
20 votes
6 answers
111k views

How to auto start openvpn (client) on Ubuntu CLI?

I'm using Ubuntu 12.04 64bit. I have an *.ovpn file that works if I type: sudo openvpn client.ovpn Now I would like to start up openvpn when I boot the computer. How can I do this?
waspinator's user avatar
  • 4,722
20 votes
2 answers
66k views

How to start and stop VirtualBox guests via command line

I've got VirtualBox on Ubuntu 16.04 as host and guests also. I have to manage guests (start, stop only) via SSH command line, but didn't find any working solution.
codolom's user avatar
  • 351
20 votes
4 answers
17k views

Shortcut to bring all open terminals to the front

After I navigate out to a webpage or editor, is there any way to bring all the open terminals back to the front in their original positions? It is a bit of a pain clicking the terminal icon and then ...
TomSelleck's user avatar

1
23 24
25
26 27
70