Questions about using the command-line interface (CLI).

learn more… | top users | synonyms (6)

4
votes
6answers
9k views

How do I turn off the screen saver using the command line?

I would like to turn off the screen saver from command line, which used to work with gconftool-2 -s /apps/gnome-screensaver/idle_activation_enabled --type=bool false in natty & oneiric for ...
2
votes
2answers
6k views

ffmpeg & ffprobe & libfdk-aac on Ubuntu 14.10 server

How to install properly ffmpeg? (not a duplicate as most of the similar answers don't work properly) Normally i compile ffmpeg manually with the following guide ...
67
votes
7answers
82k views

How to get the MD5 hash of a string directly in the terminal?

How do I get the MD5 hash of a string directly from the terminal? For example, I want the string abcdefg hashed. Currently the md5sum command only accepts a filename as input. I want to simply enter ...
-1
votes
1answer
24 views

gnome-terminal --disable-factory support problem

gnome-terminal --tab --title="700" --disable-factory -e Failed to parse arguments: Option "--disable-factory" is no longer supported in this version of gnome-terminal. i have gnome3 Any ...
0
votes
0answers
14 views

setpath in .sh script is not working [duplicate]

This is my .sh script. #!/bin/bash export PATH=$PATH:/home/srilm-1.7.1/bin When I am using this script file I could not add the environment variable path for temporary purpose(though the script is ...
36
votes
8answers
14k views

Some fast way to save and restore tabs of Terminal?

I have a Terminal window with a dozen named tabs open. I would like to save the current configuration and have it restored with names and directories. Is there a way to do this?
0
votes
2answers
47 views

how to play video using terminal on ubuntu server

A few days before, I installed Ubuntu Server 14.04 on my android, but it has no gui so I can't play video. Is there is any way to play video using terminal?
5
votes
2answers
542 views

How To Disable Sticky Edges via Command Line?

I know how to disable Sticky Edges via the Settings->Display UI, however, I want to be able to do it via command line or config file. Does anyone know how to disable "sticky edges" via a command or ...
1
vote
2answers
930 views

Importing a Python module works from command line, but not from PyCharm

My default Python binary is set to the one with the Anaconda distribution of Python. This is found at /home/karnivaurus/anaconda/bin/python, and I have made this the default by adding to my .bashrc ...
0
votes
1answer
18 views

Disable 'record file and application usage' via command line

I am creating an install script. I would like to know how to disable the recent files appearing in the unity dash. I can disable them manually via settings -> security & privacy -> files ...
2
votes
1answer
79 views

How can I determine if a process has a window, and subsequently show, hide or close it?

Is it possible, either through a shell script or terminal command, assuming you have the PID, determine if it has a main window (form), and then get info about it (title) and show/hide/close it?
3
votes
0answers
20 views

Can't change gedit preferences and terminal preferences don't save

I'm new to Ubuntu and Linux in general. I've just started using it for one of my college courses and instead of having all of us install Linux on our machines they had us install a virtual machine ...
1
vote
1answer
28 views

I would like to batch re-size images in a terminal

I've got like 500 images to resize, I'm not going to do that in gimp...a terminal solution would suit me best. On ubuntu 14.04. I've read this question on stackoverflow (first posted the question ...
17
votes
3answers
5k views

Why there is no nsenter in util-linux?

I frequently using nsenter command for my purposes in my main system under Arch Linux. Now I have to work on Ubuntu to test my apps on it, but there isn't nsenter in util-linux. Maybe it's a separate ...
4
votes
4answers
2k views

Why won't Ubuntu Terminal accept “\” character?

I can't get my terminal shell to accept a \ when I type it in. Nothing happens. I've Googled but haven't seen anything which seems to address this. I have no idea where I would start to trouble ...
415
votes
7answers
1.3m views

How to unzip a zip file from the Terminal?

Just downloaded a .zip file from the internet. I want to use the terminal to unzip the file. What is the correct way to do this?
20
votes
5answers
19k views

trim the terminal command prompt working directory

When using the terminal in a deep folder structure sometimes the prompt can take up most of the line. Is there any way in which I can trim the working directory? I know I can do PS1="\W >" to ...
50
votes
4answers
46k views

How can I shorten my command line (bash) prompt?

Currently it is: michael@Castle2012-Ubuntu-laptop01:~/Dropnot/webs/rails_v3/linker/spec/controllers$ Outside of renaming my machine and directory structure... How could I make it be something ...
0
votes
0answers
14 views

Shrink Terminal Prompt Path [duplicate]

This has crept up on me over the past many weeks to the point I am getting annoyed by this lengthy string as it gets in the way of reading the output messages. Here is what my Terminal looks like: ...
1
vote
1answer
3k views

How to download and install Heroku?

I downloaded Heroku from Heroku toolbelt using wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh in the terminal, which they recommended on their site. My Ubuntu (14.04.1) didn't ...
-1
votes
0answers
22 views

directory creation and ownership [on hold]

I have certain directories like backup/data/cm/au and backup/data/cm/Di .Ineed to create the directory path from cm/au and cm/Di in /Tmp.with the same ownership as that of the Orginal directories.I ...
1
vote
2answers
464 views

failing to install RVM while trying to install RoR

I am trying to install RoR on my system. I am following digital ocean's tutorial. While I try to install RVM \curl -L https://get.rvm.io | bash -s stable with this command I am getting the below ...
0
votes
0answers
17 views

Bash script: How to concatenate input parameters with strings? [duplicate]

I want to define an alias bak_log which uses an input parameter to backup all files starting with such string I can't find the way to concatenate the input parameter with other strings in order to ...
0
votes
0answers
13 views

How to rsync files that match “*/folderName/*”

This is to help other suffering from rsync multiple subfolders that match the name small, since i have several folders named small #version1 not work everything is synced rsync --verbose --recursive ...
0
votes
2answers
5k views

Open pwd protected http stream in vlc from CLI

Can anyone please advise me on how to open a pwd protected http stream from CLI in vlc? I checked out the --help and man pages, but they seem to offer only syntax for opening ftp, rmt and smb pwd ...
0
votes
3answers
50 views

How do i efficiently use environment variables?

I'm curious about learning about choosing correct env. variables. How to make out setting what env. variable would get the job done Example: if you want to make sure that command history always ...
0
votes
0answers
35 views

Bash script not working with shortcuts

My bash script is working flawless when i call from terminal. However, when i create shortcut to it acts weird. #!/bin/bash url="" function uploadImage { url="$(curl -s -F "file=@$1" ...
74
votes
6answers
144k views

Browsing the internet from the command line

How can I browse the Internet from the command line in Ubuntu?
0
votes
0answers
13 views

PHP in command line failed : ERROR: memdup failed

After an upgrade to 14.04 LTS, I discovered I have some trouble with PHP. It is impossible to execute maintenance script by command line: [root@xubuntu log]# php ERROR: memdup failed I get ...
4
votes
3answers
7k views

tilde and double quote keys don't work on the command line

I've just installed Ubuntu Server 11.10 and the tilde (~) and double quotes (") keys don't do anything - they don't print to the screen. I'm only using the command line (no GUI) and many tutorials say ...
18
votes
2answers
30k views

How do I log all input and output in a terminal session?

How do I keep logs of all the work done via terminal? For example, I want a record of all the work done on database via terminal.
4
votes
2answers
2k views

Where can I put a user-defined shell function?

I am planning to create a function that would simplify things for me. The function would be something like function lazymode() { echo "Hello World!"; } so that when I use the command lazymode in ...
-1
votes
0answers
40 views

\[SOLVED] After running an upgrade i have no GUI - Wily [closed]

Resolved This might be a very case specific solution, i updated my DE (sddm) because it somehow wasn't upgraded: sudo apt-get install sddm -y I am aware i am asking a duplicate question, but ...
1
vote
2answers
31 views

find: missing argument to `-exec' [duplicate]

I am having problem with the find and grep commands. I want to find the files which are *.doc and match the pattern Danish from that file with grep command. I am using -exec to combine them but it ...
14
votes
1answer
1k views

What does this “printf” command do?

I was going through a tutorial and there I came across a command: printf "%(%s)T" The output of this command is: 1454299615 Could anybody please tell me what is this command and what the output ...
4
votes
1answer
101 views

Moving files with bash scripts

I have a bash script that watches a folder, if something is added to the folder, the script will move all contents withing the monitored folder to the defined destination. I have a few of these ...
1
vote
0answers
20 views

script to open terminal with multiple tabs and different directories

I find myself opening the same set of terminals every time I startup. I have 3 tabs in a certain directory, all with python venv's activated, and then one extra tab for ssh'ing if I need to. It ...
0
votes
2answers
17 views

How to loop file names into an array or run custom code on it

This is a qna post (Do not need help, just wanted to help others). Recently worked with some files and had difficulty in reading the files #version1 (error on files with spaces) arrFiles[0]=0 ...
1
vote
1answer
18 views

copy local file to remote server in ubuntu terminal

Jeez, where's Windows drag and drop when you need it. How can I achieve this simple task? In Ubuntu Terminal I have the prompt: metheuser@metheuser-HP-Pavilion-g6:~$ I make it: ...
0
votes
0answers
34 views

E: Some index files failed to download. They have been ignored, or old ones used instead

Here is my sources.list # deb cdrom:[Ubuntu 15.04 _Vivid Vervet_ - Release amd64 (20150422)]/ vivid main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer ...
1
vote
0answers
30 views

Convert pdf to monochrome via inkscape 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 ...
3
votes
2answers
37 views

set nginx server_name variable from command

root@username:/home/dokku/appname# cat nginx.conf server { listen [::]:80; listen 80; server_name appname.wrongname.co.uk ; access_log /var/log/nginx/appname-access.log; ...
5
votes
3answers
554 views

Any way to list similar commands?

When you write the command name wrong, bash often does this: septi@norbert:~$ good No command 'good' found, did you mean: Command 'gold' from package 'binutils' (main) Command 'gmod' from package ...
0
votes
2answers
27 views

“which” command is not showing anything on standard output

When I run the which command it shows nothing. I ran all these, and none gave output. $ which /tool/ $ which RED*.pdf $ which anime $ which -a anime $ info which $ which -a $ which -a Downloads ...
0
votes
0answers
26 views

Manually connecting to WiFI network using iw results in disconnect

I want to manually connect to a Wifi network using either iw or iwconfig. I have tried both. My laptop is running Ubuntu 14.04 with network manager normally managing my wired and wireless networks. I ...
7
votes
5answers
333 views

I need help with Grep to start at a section

I have some text files that I want to grep a section of code from. The goal I am trying to achieve is to start the view at a certain line & then be able to read anything below it. For example. In ...
4
votes
3answers
167 views

Size of device file ( missing in ls -l output )

When I try to print the device file output shows binary data in hexadecimal format. But upon doing a ls -l /dev/sda I get: brw-rw---- 1 root disk 8, 0 Jan 29 12:29 /dev/sda I don't ...
1
vote
1answer
2k views

root shell bash commands not working

I attempted to change my sudo password(I removed myself from sudoers list by mistake). I tried following. In recovery mode, I dropped down to root shell. It is still asking root password. Ctrl D ...
3
votes
2answers
118 views
+50

Terminal lines shown during scrolling, use CLI

Long listings are only partially shown since the amount of lines remembered isn't too large. I'd like to cancel the limit of lines in a similar way to the following: Terminal limits scrolling How do ...
182
votes
7answers
378k views

What is the correct way to completely remove an application?

I've searched the net for such information and found different command lines, like these ones: sudo apt-get remove application sudo apt-get remove application* sudo apt-get remove --purge ...