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

learn more… | top users | synonyms (6)

0
votes
0answers
3 views

Problem after removal of MongoDB

I installed mongoDB using this instruction manual, but was unable to start it, so I decided to remove the Database by following same instruction set. Since the removal I don't get default options when ...
0
votes
0answers
9 views

Learn Ubuntu shell language [duplicate]

What's the best way to learn it and understand the commands? I am not a total newbie: when it comes to code I can do HTML, vas and Javascript alright. For school I made a text game in Visual Basic: I ...
1
vote
2answers
63 views

How to check if script was executed via command line or double-clicked?

How can I determine if a script was invoked from a command line or via double-click in file manager (Nautilis)? If the former, I still have a command prompt when the script finishes, but if it was ...
4
votes
1answer
523 views

What are the differences between executing shell scripts using “source file.sh”, “./file.sh”, “sh file.sh”, “. ./file.sh”?

Have a look at the code: #!/bin/bash read -p "Eneter 1 for UID and 2 for LOGNAME" choice if [ $choice -eq 1 ] then read -p "Enter UID: " uid logname=`cat /etc/passwd | grep $uid | ...
16
votes
4answers
46k views

How do I run a script at start up?

I have a script in a folder: /path/to/my/script.sh I need this script to run every time the system starts (even if no one logs in to the system). What do I need to do in order to make this happen?
2
votes
2answers
111 views

Why do scripts ran via “sh *.sh” function differently than “./*.sh”? [duplicate]

I'm using Ubuntu 15.10. I have noticed a weird problem. When running a rsync command embedded in a shell script (as root) with --exclude={} options, rsync works and excludes paths as it's supposed ...
0
votes
1answer
23 views

Kill program when VPN is running

There is a program that I need to not have running when my VPN is running. I don't want to resort to closing it manually every time, because I might forget sometime. I would like to guarantee that ...
1
vote
2answers
50 views

text between 2 words with some lines before patterns

how can I find lines between two words with 3 lines before START_WORD in sed or grep or ... for example output from a command is: my name is Mansour and I confuse to use sed or grep for piping my ...
0
votes
0answers
20 views

I cant get the cp command to work

I the terminal if I issue the cp command, it states "The program 'cp' is currently not installed. You can install it by typing: apt-get install coreutils" but when I try to install it, i get the ...
-1
votes
3answers
29 views

Extract info from file

Is there an efficient way to parse a file like: 2 41620 . T G 100 PASS ...
0
votes
1answer
11 views

Problem in renaming the partition and opening a file through terminal

I installed Lubunntu 15.10 on my pc and my ntfs partition which I didn't touched at all named in a very weird way I want to rename it so used the Disks to rename after reading this but it shows this ...
0
votes
1answer
9 views

OpenCV is not installing

I have recently installing OpenCV 3.0.0 with the help of script "install-opencv.sh" I have used command $ sudo bash install-opencv.sh error are below wget: unable to resolve host address ...
0
votes
2answers
11k views

Command Not Found when running 'svn'

I installed the Ubuntu 12.04 from a usb drive. I am having issue with my wifi connection. I tried to update the network adapter but ran into this problem with the svn command. sudo svn checkout ...
0
votes
2answers
26 views

How i can run java from terminal? [on hold]

I've copy the java from downloads folder to the bin folder and I've tried so many ways to set it. So can just type java in terminal. But it always not working. Please help me.
-1
votes
0answers
16 views

To write the path of a folder with space in its name I have used the following syntax

suiit@suiit:~/Desktop$ cd /opt suiit@suiit:/opt$ cd "Assignment 2" bash: cd: Assignment 2: No such file or directory suiit@suiit:/opt$ Why is the above method not working?
0
votes
1answer
27 views

Getting error while starting ubuntu 14.04

Every time I start my system I received this message: Error found when loading /etc/profile: /etc/profile: line 1: syntax error near unexpected token (' /etc/profile: line 1:iamgreat# /etc/profile: ...
10
votes
4answers
10k views

How to play music in terminal?

I want a command line to play a specific music file in terminal (or script) from my hard-disk. It would be better to do it without installing extra packages.
18
votes
7answers
18k views

How to determine where biggest files/directories on my system are stored?

I was wondering how do you know where the largest files in my system are stored. For example--- Disk Space Used: 1GB Java: 500MB Java Percentage: 50% maybe represented in a pie chart. Maybe? I know ...
39
votes
4answers
26k views

Bash history handling with multiple terminals

I use mainly Terminator, and it's usually opened with 3 split terminal windows. I also use Gnome terminal for various reasons. I'm wondering how is bash history handled in this case as I sometimes ...
1
vote
0answers
42 views

Ubuntu 15.10 update-motd.d not affects the MOTD

I added a new file 80_own-motd to the /etc/update-motd.d directory on my Ubuntu 15.10 Server. #!/bin/sh echo ">>>>>>Welcome to my Ubuntu ...
1
vote
2answers
42 views

Problem with using wildcards when I do CP command in Terminal

I am new and try to learning Terminal Command. Today I faced some problem with cp wildcard command option. I wrote in Terminal this command cp Downloads/[:alnum:] test/ Here, Downloads is the ...
1
vote
0answers
9 views

managing open LDAP server users

When I'm trying to add a group I'm having errors : $ sudo ldapaddgroup ldsales Error adding group ldsales to LDAP I don't know why I have an error. My userldif: dn: ...
-1
votes
1answer
55 views

How to root my lenovo a6010 smartphone using ubuntu PC? [on hold]

I have lenovo a6010 smartphone with android lollipop. I want to root my smartphone. I have ubuntu 15.10 and no access to any windows computer I have installed adb and fastboot, update adb and write ...
1
vote
0answers
26 views

Spelling mistake in ~/.bashrc

I am a newbie and I wanted actually install MeanJS but then I made the following mistake. I wanted to paste this in the terminal: echo 'export PATH=$HOME/.node/bin:$PATH' >> ~/.bashrc But ...
1
vote
0answers
9 views

Shell script to create multiple accounts? [duplicate]

I'm looking for some help with a school project which needs a shell script to create 10 accounts (5 teaches and 5 students into different groups) along with respected passwords. I'm a true ubuntu noob ...
2
votes
3answers
72 views

Print different output in the same csv file

I'm writing a script to analyse some data. I have several subset of files, and I would like to count the line from these files and write the result into a csv file. I'll try to do an example. I have ...
41
votes
3answers
261k views

find a file using the terminal

I am trying to find a directory, using the terminal and I am not sure where it is. I mean that i used the wget command to obtain the file and used it for installation and now i am not able to find ...
3
votes
6answers
4k views

How to fully remove VLC Player?

I installed VLC player, but now I want to be fully rid of it, so I typed in the following command in Terminal: sudo apt-get purge vlc And it told me that it had purged it, but then in Terminal when ...
32
votes
5answers
91k views

How to change the default font size of XTerm?

XTerm font is very small. How can I set it larger?
46
votes
4answers
22k views

How do I set fish as the default shell?

Is there a way to set fish as the default shell in ubuntu netbook remix? I put in my .bashrc to run fish, which works fine, but ubuntu recognizes it as fish running inside bash, which means that when ...
46
votes
5answers
115k views

How do I save terminal output to a file?

How do I save the output of a command to a file? Is there a way without using any software? I would like to know how.
0
votes
1answer
27 views

How do I write an output of one command into a file? [duplicate]

Let's say we got a content of the following command in bash, which consists of several rows, and just one column: tacmd listsystems | grep -i $i | awk '{print $1}' This content is a list of offline ...
4
votes
5answers
8k views

Is there a terminal command to verify if Wifi is enabled?

Since my laptop doesnt have a Wireless Network LED indicator, I want to know if there is a command to verify if it is on or off (I'm installing the wireless drivers, so I can't tell if it is set on or ...
19
votes
4answers
3k views

Why does 'ls > ls.out' cause 'ls.out' to be included in list of names?

Why does $ ls > ls.out cause 'ls.out' to be included in list of names of files in current directory? Why was this chosen to be? Why not otherwise?
8
votes
5answers
469 views

Is there a terminal logout that does something like what GNU Screen does?

As most of you know GNU Screen is a nice tool that enables you to do something like: One other good use for the detach and reattach is as a console-mode "remote desktop" feature. You can detach ...
0
votes
0answers
19 views

how do I block other computers in LAN like 'net cut' in windows

i used 'net cut' in school to block other computers in LAN. How can I do the same in Ubuntu? I am looking for a program or terminal commands.
0
votes
2answers
297 views

Why using the command `./myFile a` `a` is intepreted as an input parameter?

After compiling a program with g++ -o myFile myFile.cpp I used ./myFile & to execute the program. When using the ampersand, I understand the program is executing in the background. Can someone ...
2
votes
2answers
258 views

How to enable cut or copy-paste in xterm

I regularly uses xterm for web browsing because of its image rendering property but the one thing which makes xterm difficult comparing to terminal is the copy/cut paste availability in terminal ...
6
votes
3answers
2k views

How to check which terminal emulator is being currently used?

I have gnome-terminal and Guake installed. I want to give different startup messages to be displayed on these terminal emulators as they start. What code should I write in .bashrc so that this is ...
0
votes
0answers
17 views

How can I fix the following error? - “sendmail: fatal: Recipient addresses must be specified on the command line or via the -t option ”

When I am trying to send a test mail from 'cacti' web-console, I am getting the following error in the logs as well as the web console while using 'sendmail' service. How can this be fixed? > ...
3
votes
3answers
71 views

How do I capture a screenshot of a window, and all the windows on top of it?

I'm using screenshots as regression tests for GUI software. Before deploying each new version, a series of automatic tasks is run against the old and the new version, screenshots are generated after ...
-1
votes
0answers
9 views

How to scroll, copy and paste in terminal using Bitnami Ubuntu VM [on hold]

I just install Bitnami RubyStack VM (non GUI). So first time using Ubuntu without GUI. So am missing lot of stuff like the mouse, scrolling through the terminal, copying or pasting text from the host ...
-2
votes
1answer
15 views

Mac Terminal - how to rename directory [on hold]

Misspelled last night and need to rename a drectory :) I created a direcoty and it misspelled. I would like to correct that.
4
votes
3answers
66 views

ASCII source file checker

For official Ubuntu documentation where the source English files are in docbook xml, there is a requirement of ASCII only characters. We use a "checker" command line (see here). grep --color='auto' ...
3
votes
1answer
118 views

How do I show the git branch with colours in Bash prompt?

I am using this guide to show the branch name in gnome terminal (Ubuntu 15.10) when working in a git repository. Based on the above I now have the below in my ~/.bashrc file: # uncomment for a ...
0
votes
2answers
835 views

Can't install xampp for linux

I'm trying to install xampp as shown here, with the following line: su chmod 755 xampp-linux-1.8.3-installer.run ./xampp-linux-1.8.3-installer.run Su goes well, but the terminal doesn't run the ...
-2
votes
1answer
48 views

How can I shutdown multiple systems using terminal?

How can I shutdown multiple systems using the terminal? Also, is it possible to send a message to multiple computers before shutting them down? I cannot login to them via SSH, but all the computers ...
0
votes
0answers
51 views

sudo apt-get install showing error

sudo apt-get install shows the following error: Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 2 not ...
2
votes
2answers
231 views

How do I move between windows in IRSSI?

In IRSSI, I've always been able to use alt3 or alt5 to jump directly to specific windows. That seems to have stopped working. I think it probably happened with the update to 15.04, but I can't swear ...
3
votes
2answers
45 views

Output of running commands in Terminal

I use this line to delete files find . -type f -iname \*.vi -delete and this line to move files find . -name "*.doc" -exec mv {} /path How can I see the process as it happen, I mean I don't ...