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

learn more… | top users | synonyms (6)

2
votes
4answers
82 views

How do I run any application as root? [duplicate]

While logged in as the root account of a CLI installation, almost every application gives me this error: Don't run this as root! I want to bypass this error and run the application while logged ...
0
votes
0answers
35 views

Launch app with Unity Launcher vs Terminal?

I have ubuntu 14.04 and ros indigo in my system. When I use any application (e.g. eclipse + PyDev or spyder) to run python code for ros (very simple code such as import roslib). If I launch the app ...
3
votes
1answer
20 views

Non-graphical terminals take a long time to log in

When I log in using SSH or after pressing Ctrl+Alt+F1, it takes several seconds after I enter my password to finally show the following: Welcome to Ubuntu 16.04 LTS (GNU/Linux 4.4.0-28-generic x86_64)...
3
votes
0answers
29 views

Problem with wget and file extensions

I'm using wget to download a website that is a problem archive, some problems are available in html and some others are in PDFs in the same domain. The problem is when I use the option --adjust-...
4
votes
4answers
618 views

How to copy or move a file from a folder to desktop?

I am a beginner and I want to copy/move a file from a specific folder to the desktop. I use cp and mv for those tasks. But I want to copy/move to the desktop. Say I want to move file1 to Desktop, I ...
0
votes
1answer
40 views

Pass a Number Value into a Shell Script

I regularly run a .sh script that has a list of menu options and expects a value from 1-7 that corresponds to a list of menu options. 99% of the time I use the same option (#6) so I'm trying to figure ...
4
votes
0answers
52 views

How to catch the command failure events in ubuntu?

I am trying to execute the script whenever the command fails. We all know that if the command is failed $? value will not be equal to 0.It gives the value 127 if command fails. The script is ...
4
votes
1answer
227 views

I get no output when I compile Java code from the Terminal

When I try to run my Hello World program it doesn't show any output: $ ls hello.class hello.java $ javac hello.java $
1
vote
1answer
39 views

Having Trouble Transferring file to a new folder

I get this message when I try moving a file to a new folder sudo mv bios.rom usr/share/higan/GameBoyAdvance.sys mv: cannot move 'bios.rom' to 'usr/share/higan/GameBoyAdvance.sys': no such file or ...
2
votes
1answer
18 views

copy text to diodon/clipboard on boot

How can I copy text to diodon/clipboard from terminal command? I work frequently in norwegian with is not my native language, so I would like to always have norwegian letters in my diodon to simply ...
0
votes
1answer
28 views

compilling and running C++ executables from ubuntu browser

I have a question can I run a linux executable from Ubuntu (not from the linux command line)? I created a file demo.c” in the command line and then compiled it (then fixed the bugs then compiled it ...
1
vote
0answers
21 views

How to limit a process to use X memory and T time?

I think one solution to this problem is ulimit . But I found following code in domjudge, how they are handling this can somebody explain.They are not using ulimit.I am not good at shell.But still your ...
1
vote
0answers
18 views

exclude socket files during diff -r

diff has an option --recursive (-r) to do a comparison between two directories (the files inside them). Is there a way to make diff ignore all socket files and only socket files? I am using diff --...
1
vote
1answer
52 views

How to avoid password request for sudo for crontab scripts?

I need that a new user could execute sudo without any request of password, because this user has in crontab a .sh that uses sudo for some commands. I created a new user on my ubuntu server 16.04 x64 ...
3
votes
1answer
116 views

How to force command line VLC to stream youtube videos of specific quality?

I want to stream youtube videos from command line using VLC media player. I was able to stream youtube videos using this command cvlc https://www.youtube.com/watch?v=m2Oo4kBHBNU The problem is that ...
2
votes
1answer
54 views

Unable to run a script from a text file

I have a simple script that I want to be able to run by double clicking a text file and having it run in terminal so i don't have to do it manually #!bin/bash $ cd /home/tyler/df_linux $ ./df I've ...
0
votes
1answer
31 views

Java file won't run

So I've installed Java 8 via PPA using this method: http://tecadmin.net/install-oracle-java-8-jdk-8-ubuntu-via-ppa/ And it seems to be working: jamie@jamie-ncase:/media/fa7e62a0-92d8-4af6-86d9-...
1
vote
2answers
68 views

Unable to using Terminix [closed]

I can no longer use Terminix. I remember that last thing I did in Terminix it was setting own command (echo) with option immediately closing terminal. Since then, Terminix always starts and ends at ...
5
votes
1answer
65 views

How to extract first 10pages from each pdf files of a folder

I have 90 sub-folders in a folder. Each sub-folder contains pdf files. Total pdf files are nearly 2200. How can I extract page number 3 to 10 from all pdfs? To extract the pages from one pdf, I am ...
2
votes
1answer
24 views

How can I view the output of a .sh file placed in rc.local?

I wrote a short script to run lampp's php script. It is residing on rc.local where I first run opt/lampp/lampp and then, run the sh (which is infinite) that is echoing to the output buffer infinitely. ...
7
votes
2answers
45 views

How to effectively navigate the Terminal and installed packages/commands?

I am an electrical & computer engineer that has recently started using Ubuntu 16.04 to modify an Android-based Computer on Module (COM) to suit the needs of a new product I am working on for the ...
2
votes
0answers
19 views

Extracted a zip to install exe but directory is locked and not found with ls -la

Quite new to Lin. Downloaded Visual Studio Code to extract its binaries and install. Got to files but one is a locked directory that I want to delete and I can't even find with sudo ls -la to later do ...
15
votes
1answer
552 views

How to set the first picture of every folders as their folder icons?

If there are pictures in folder A, B, C.....Z, how do I automatically set the first pictures of these folders as their folder icons? Is there a way like a script or something else?
5
votes
2answers
38 views

Isolate specific info from terminal output

How can I shorten the data that I retrieve once I enter a command? For example if I input: ifconfig -a getifaddr I only want the IP address, nothing else. Surely there is something else that I can ...
2
votes
1answer
66 views

Controlling Ubuntu Gnome 16.04 screen lock with arduino

I am trying to use arduino with my laptop (Ubuntu-gnome 16.04 installed) to control the screen lock using RFID Module (Screen lock/unlock is controlled by an RFID card) Here in this particular case, ...
3
votes
0answers
88 views

packages installed via Software Center do not show up in menu without reboot

After installing Opera using the Software Center, its icon does not show up in the start menu. But after I reboot, it does show up in the start menu. It's really annoying that I have to keep ...
0
votes
1answer
23 views

Issue with dir is other-writeable but not sticky (blue text, green background on all directories)

Some background: Distro: Ubuntu 16.04 LTS Experience level: Not new to Linux, but not an expert. The issue: When working with SMART Tools to check an external USB drive, somehow I managed ...
0
votes
1answer
17 views

Emscripten and em++ install question

I installed the latest emsdk_portable so I could use Emscripten, then I ran the following commands with no problem. $ ./emsdk update $ ./emsdk install latest Then, I went to run this command: ./...
1
vote
0answers
23 views

R statistics on Ubuntu 16.04 lts: copy and paste does not work

I installed Ubuntu 16.04 on 2 different machines. On both I have this problem: I open a terminal, call for R statistics, copy my code from any file (txt, doc, xls, csv, it's all the same), paste it on ...
4
votes
1answer
215 views

Run in terminal not working

I am new to Ubuntu and I was trying to run this script: #!/usr/bin/env bash echo hello world It works fine if I open the terminal first and manually invoke it. Like ./test. I have set "Ask each ...
2
votes
1answer
31 views

How do I create a program similar to 'fortune', that can be installed using apt-get install

I am trying to create a program, let's call it abcd like http://linux.die.net/man/6/fortune that can simply be installed like $ sudo apt-get install abcd. Now for the specifics, my program simply is ...
5
votes
1answer
49 views

Why is the output of wall command not displaying in stdout?

I am using ubuntu 14.04. I'm executing the wall command like this: $ wall Hi this is for testing ^d But it doesn't display the message in terminal. I'm just executing the wall command in my machine;...
0
votes
1answer
45 views

How to change access rights for /?

I accidentally changed access rights on / for my Ubuntu 16.04 using sudo chmod 466 /. I was supposed to change access rights for a file but instead I accidentally executed a chmod on / (root directory)...
0
votes
0answers
15 views

How to start byobu everytime I start a terminal when using zsh as default shell?

I'm using zsh as my default shell. I installed byobu and it seems to work fine, however I have to launch it manually every time I start a terminal instance (Ctrl+Alt+T). I checked byobu-config and ...
0
votes
1answer
36 views

.sh to loop through folders recursive-

My file path is /server/2TB_HDD/TV Shows/ (inside this I have about 100 shows, each with seasons in them) The problem I seem to be having is the file path. "TV Shows" part. Similar problem if I run ...
1
vote
1answer
90 views

Bash : Syntax error near unexpected token '('

i am a beginner to Linux stuffs. Following some tutorial I used the following command, that split my zinc.mol2 into 1000 files named tmp. cat zinc.mol2 | csplit -ftmp -n4 -ks - '%^@.TRIPOS.MOLECULE%' ...
11
votes
3answers
1k views

Why does redirecting sed output to same input file make my machine unresponsive?

I was trying sed to replace some keywords in a large file (100 MB). I was unaware of the -i (inplace) option, so my first attempt was to redirect like this: sed 's/original/edited/g' file.log >&...
2
votes
5answers
73 views

Shell Script source file not saved

I saved a shell script in bin(created by me). When I run the program, to avoid ./ to run the script I need to copy the script to one of the directories specified by PATH variable. The bin directory ...
26
votes
7answers
4k views

Why doesn't the command “ls | file” work?

I've been studying about the command line and learned that | (pipeline) is meant to redirect the output from a command to the input of another one. So why does the command ls | file doesn't work? ...
3
votes
4answers
63 views

formatting with awk

I have this text: Core/Dev Core/master FrontEnd/Dev FrontEnd/DoubleClick FrontEnd/HEAD -> FrontEnd/master FrontEnd/master Infrastructure/Dev Infrastructure/master Software/Dev Software/Control ...
6
votes
4answers
593 views

How to copy a folder to multiple folders using command line? [duplicate]

I want to copy a specific folder from one point to another and I have more the 300 destination folder where I want to copy that specific folder. Can anybody assist me with a proper solution? shell ...
1
vote
1answer
19 views

Visudo - Change user without password doesn't work

I want a user to be able to change to another user without a password and any other root rights. I followed already a hint on http://apple.stackexchange.com/questions/82438/allow-sudo-to-another-user-...
1
vote
2answers
50 views

How to copy files from multiple directories, adding the parent folder's name to the filename?

I have been looking to all possible answers about "copying file from multiple directories to one single directory" but I cannot find my answer. I need something slightly more specific for my database ...
1
vote
0answers
16 views

apache2 -V getting error messages

AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf: Invalid Mutex directory in argument file:${APACHE_LOCK_DIR} My apache is located under /usr/sbin/, when I run /usr/sbin/apache2 -V ...
0
votes
0answers
10 views

How do I extend a partition with rootvol through the command line?

Here is a picture of my current fdisk, parted, and lsblk data: Thanks for the help. I have no idea what to do.
1
vote
1answer
32 views

Activating Matlab from Command line and from Launcher [duplicate]

When I type Matlab (without sudo) on the command line for the shell, matlab properly opens. Then, on the left pane in Ubuntu 16.04, I tell Ubuntu to lock Matlab to launcher. However, when I try to ...
3
votes
1answer
28 views

How can I enable auto-completion for the snap command?

I am used to auto-completion for the command sudo apt-get install nam. Pressing tab will autocomplete the command to sudo apt-get install name. The same method, however, does not work by default for ...
1
vote
0answers
22 views

Autocomplete SSH bash: export: `-a': not a valid identifier

When I try to autocomplete using double TAB, I get this error: bash: export: `-a': not a valid identifier This mainly happens when trying to autocomplete ssh routes. However sometimes it fails to ...
3
votes
3answers
37 views

How to effectively use the man pages?

I am looking forward to mastering linux. I have been repeatedly told to refer to man pages when you are in doubt. Though I am very comfortable with the commandline, I find it very difficult to ...
7
votes
2answers
603 views

Open already running program via terminal

How do I switch to already running program using terminal? For examaple: firefox opens new firefox window. Is there a command that will focus the already opened firefox window?