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

learn more… | top users | synonyms (5)

1
vote
1answer
419 views

Running a command in a new terminal instance in a bash script

I have a bash script where I configure my proxy settings automatically. I have created some aliases in the .bash_aliases file. Now there is one command where I ssh into my remote server and do some ...
1
vote
1answer
241 views

`/etc/profile.d` really does not want to work for me

Does /etc/profile.d work or not? I create a file rexster-console.sh in /etc/profile.d: alias rexster="/var/rexster-console-2.4.0/bin/rexster-console.sh" -rwxr-xr-x 1 root root 66 Feb 15 13:05 ...
2
votes
1answer
37 views

How to list all the PIDs and names of all the runing processes

I know that there is this command : ps aux to get all info about the running processes .. but I need only the names and ids for these processes , is there any command can list the processes ids or ...
16
votes
4answers
17k 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
0answers
68 views

Turn off monitor and make it stay that way

My monitor does not have a turn off button, so I want a short-cut key that exactly replicates that behaviour. I currently use xset dpms force off but it turns on to every possible event mouse or ...
1
vote
1answer
176 views

How to count the total number of the opened files by the users and processes on my machine

I used this command to display a list of all opened files of the current user on my machine : lsof -Fn -u teeba| sort | uniq | grep /home The result was : I want to know the total number of the ...
4
votes
2answers
313 views

How to use free -m to get memory usage for all users

I typed the free command to get the memory usage as follows : free -m output: I want to use this command to get the same info but for all users for example : I used this command .. because ...
2
votes
1answer
1k views

What for `--disabled-login` and `--gecos` parameters from inside of `adduser` command stands for?

Running Ubuntu 12.04, I setup a private git server and created a group called git some time ago. Now I am following a guide to install gitlab and when it came to adding a user to the git group and ...
0
votes
1answer
67 views

Trying to compile binaries with static flag?

i am working over Gem 5 simulator on ubuntu OS and i need to compile any program with static flag for this i am using this command: [/work/gem5] alpha-linux-gnueabi-gcc –DUNIX –o queens queens.c ...
0
votes
0answers
18 views

Terminal wont allow me to do sudo commands [duplicate]

When I attempt to run: sudo apt-get install (place any program package name here) I receive the following: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: ...
1
vote
0answers
487 views

shell script: cd to dir and execute command [closed]

I'm trying to create a shell script that will automate the creation of a Maven project. The last line throws an error [ERROR] Unknown lifecycle phase "–Dwtpversion=2.0". You must specify a ...
0
votes
1answer
145 views

Terminals on Second monitor

I have a HP G62 laptop and a NEC AccuSync LCD73v monitor, which I connect via VGA. I use the terminal a lot, so at startup ubuntu auto-launches 4 Xterms. Is there any way to start them at a specified ...
1
vote
3answers
184 views

Find unique names containing consecutive repeating consonants

I'm just starting to learn how to use Ubuntu and I am having some difficulties. I am supposed to use back-referencing to find unique girl names containing consecutive repeating consonants in a file ...
2
votes
2answers
195 views

Number of columns in a vim file

Is there an equivalent for wc -l to have the number of columns of a vim file? (I have a file with several rows and columns separated by spaces)
0
votes
2answers
68 views

How to redirect all manuals to files?

Just for fun, or say for sake of convenience, I decided to write out all man pages to files. Now if I have to do it one by one, I would do man package-name > filename. But I want to do some ...
-1
votes
1answer
80 views

/ect/hosts file error

I am having some issues while running apt-get from my command line. I looked into some answers in askubuntu and found that we have to edit /etc/hosts file. The only entries present in that were more ...
2
votes
1answer
793 views

Internet issues with Ubuntu in oracle virtual box

I have ubuntu 12.04 LTS installed in as a VM in Oracle virtual box. I am able to browse from firefox but trying to connect from command prompt to update is failing. I also tried to change software ...
2
votes
0answers
19 views

No Icons or menubars visible in Ubuntu 13.10 [duplicate]

I'm unable to see any icons or menubars on my desktop. However, I am able to open up the file/folder explorer by inserting a USB, which opens up the explorer and let's me open applications and files ...
0
votes
0answers
47 views

How to forward proxy ports on ubuntu

Pleas help me friends, i want to forward a local-host port from command line.i want to forward 127.0.0.1:8085 to 127.0.0.1:9666. i searched it everywhere but,i haven't proper answer yet.
0
votes
1answer
330 views

how to get cpu usage percentage on ubuntu

I've typed this command to get the history of cpu usage : dstat -ta --top-cpu and got data as the following : my question is what type of data from the previous result should i take to compute ...
2
votes
0answers
228 views

after ssh session : -bash: /bin/ls: no such file or directory

I've logged into my Ubuntu server from work via putty under Windows. Right away I noticed something weird. I could not use the ls command. Got: -bash: /bin/ls: no such file or directory I didn't pay ...
1
vote
0answers
184 views

How to open a file in Sublime Text 2 directly from a link in terminal?

I use two dev boxes - one is MacBookPro where I use iTerm and one is Ubunu where I use the built-in terminal. In iTerm I have the following neat feature. Say you have run some tests, which fail and ...
2
votes
3answers
2k views

Extracting a part of a massive csv file from command line

I want to read parts of a big csv file between rows n and m and between columns p and q. Is there an easy way to do this easily with the shell? (Are there commands I should read the doc's? otherwise, ...
2
votes
2answers
517 views

How do I use cut to make tab the delimiter?

I am working with the egrep command and I need to pair with the cut (and ONLY cut) command to change a ":" into a tab. For example change: Blahblahblah:2000 to: Blahblahblah 2000 I currently ...
0
votes
1answer
126 views

List Video Filename and Duration for multiple files in folder and subfolders with path too if possible

I need to get a list of filenames and path along with the duration of the file. All are video files. Some files are in subfolders as well. I need the list sorted according to duration. My goal is to ...
0
votes
0answers
68 views

No internet connectivity in command line ubuntu

i am beginner and I have installed command line ubuntu 12.04 and upgraded it to 12.4.3.Then I installed KVM as I want to install 2 VM's and connect them to physical network.The problem is when I ...
0
votes
0answers
15 views

problem with sudo apt-get after tryng to install wine [duplicate]

I try downloading wine, use : sudo apt-get install wine. terminal stop working and I try restart terminal many times but result was same so i stopped. then i try using sudo apt-get command and this is ...
0
votes
2answers
5k views

How do I install a .zip file via the command line? [duplicate]

How do I install a .zip file via the command line?
7
votes
1answer
482 views

How do I set the default terminal profile?

So I was messing around with profiles in the Terminal, I was wondering how to make the profile I setup as the default profile whenever I load up terminal.
0
votes
1answer
46 views

config file of shell complete

I want add autocompletion to my script. I wrote bash code for autocomplete (using this tutor http://tldp.org/LDP/abs/html/tabexpansion.html) and put it to /etc/bash_completion.d/ then i execute in ...
1
vote
1answer
636 views

Command line PDF printing - automatic filenames based on timestamp [duplicate]

Ubuntu 12.04 LTS, 3.8.0-35-generic kernel, Firefox 27.0 If I print a text file to pdf, I get a default filename which is always the same. (it is always "output.pdf") How can I have automatic file ...
0
votes
1answer
612 views

Terminal command prompt missing

I'm using Ubuntu 12.04. The command prompt (username@desktop:~$) in Terminal went missing. How do I get it back? Thanks Solved by searching. I'm just a week new to Linux. Thank you very much Olli ...
2
votes
1answer
231 views

how download mails folder from command line?

I want to download mails (batch download) i have in the "sample" folder from my yahoo mail to local folder. any command-line client for downloading mails from mail? thanks
3
votes
2answers
1k views

How to create shortcut on ubuntu to open a terminal with some folder?

I have a ubuntu running in vmware, and the folder is mnt/hgfs/somefolder (shared folder from VMWARE). How can i create a shortcut to open a terminal with this path (mnt/hgfs/somefolder) without need ...
2
votes
1answer
145 views

unable to locate package cgroups-lite

$ sudo apt-get install cgroups-lite [sudo] password for neethu: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package cgroups-lite
1
vote
2answers
953 views

Create launcher shortcut for RDesktop

I am trying to create a 'shortcut' that I can pin to my launcher in Ubuntu 12.04.3 LTS that will lauch an RDesktop session. It works fine from the command line thus: rdesktop -u UserName -d Domain ...
5
votes
2answers
1k views

How do I make a sudo command start at start-up with a 1 minute delay?

I would like to make a sudo command (sudo service smbd restart) run after 1 minute of being logged on. How would I go about doing this? P.S. This is a system with no monitor, mouse, keyboard or ...
5
votes
1answer
495 views

How to save live log bash input to a file?

When I am teaching a class, some students have problems following my CLI commands and would like to scroll back to be able to repeat the steps in their own speed. So I'd like to log all my inputs in ...
8
votes
2answers
584 views

How can I remove a file that looks like a flag? [duplicate]

While using grep with -oG flag I accidentally create a file named -v. -rw-rw-r-- 1 username username 334 Feb 10 14:29 -v Now I cannot figure out how to get rid of it. I've tried: rm -v rm "-v" ...
1
vote
1answer
211 views

c++ Programme compiled successfully but unable to run

I compiled the program using gpp it was done successfully but when I tried to run the program I got these errors:- I have included using namespace std; in 3'rd line harish@harish-Lenovo-G580:~$ gpp ...
1
vote
1answer
208 views

Open a terminal a run a program on it automatically when the session starts

I have a script to open a terminal and run a command on it: #!/bin/bash export DISPLAY=:0.0 /usr/bin/gnome-terminal -e '/home/me/bin/application --option a --option b --debug' However, the ...
0
votes
1answer
70 views

Update xfce4-mailwatch from the command-line?

Is it possible to run a command in the console and trigger an update event for xfce4-mailwatch? I am looking for the command-line equivalent of right-click and then Update Now. Using Xfce 4.12 and ...
0
votes
1answer
641 views

simply need to copy program file notepad.exe from the \windows to the \tools directory using command prompt [closed]

attempting to copy program file notepad.exe from the \windows to the \tools directory using command prompt. Trying to complete simple tasks using command prompt, but still unable to grasp. have not ...
0
votes
1answer
63 views

Console output headers not aligned with columns

How can I make all command-line tools like arp or netstat show their output properly, so that the header line is aligned with the rest of the output? The answer should not be manipulating the ...
0
votes
1answer
63 views

Accidentally Uninstalled Network manager

Before my network wasn't working, and I was told to uninstall the network manager, but now, I don't know how to get it back... Does anyone have the steps to not only fix my network manager, but also ...
2
votes
2answers
93 views

How to start a program without interrupting my current session?

I'am working on some code or document and I need an additional program like IntellJ e.g. How can I start this program in the background without popping up and interrupting me on my work? Often I start ...
0
votes
2answers
42 views

How to open applications after booting a purely Command line interface?

After booting linux in purely command line mode how can I open an application eg web browser or Libre Office? For example if I use the command "play" with any audio file it starts to play it. I want ...
0
votes
2answers
82 views

Delete files of a type from a directory [duplicate]

I just deleted my $HOME accidentally and used photorec to get back what it could recover. However it restored a LOT of files. The backup is of multiple file types and contain more than 70,000 files. ...
0
votes
7answers
851 views

What can I do with Terminal? [closed]

I recently installed Ubuntu just to change things up from my typical windows, but every one always talks about the magic you can work with the terminal, and how great the terminal is. What, exactly, ...
1
vote
2answers
80 views

How to make the terminal autoclose when a command runs successfully?

I want to make the terminal autoclose when a command runs successfully. It shouldn't autoclose if the command produces some error. For example: If I run sudo apt-get install vlc, the terminal should ...