Most voted "linux" questions
For SOFTWARE DEVELOPMENT issues that are specific to the GNU/Linux operating system. Mere use of shell and desktop, installation and support are not within the scope of the site. If your question is not about development or development but has nothing to do with Linux Apis or Linux-specific behavior you should not use this tag, even if you are running on Linux.
Learn more…1,005 questions
Sort by count of
-
7
votes1
answer1984
viewsHow to have two versions of php on the same Apache server?
I have an Apache/2.4.10 (Ubuntu) server running a site in php 5.5. But I’m creating a new site and it needs php 5.6. It has to have two versions of php installed on my server and use each one in…
-
6
votes1
answer576
viewsHow to detect the error cause: 'The requested URL returned error: 503'?
I’m working on developing a web-site where I get back and forth the following error that I can see through the Firebug: The requested URL returned error: 503 Is there any way to find out the origin…
-
6
votes1
answer2288
viewsMysql falling due to lack of memory
I have a dedicated server Linux Ubuntu 12.04 LTS with Mysql/Apache/Wordpress, Only since he has only 1Gb of RAM, sometimes he falls for lack of memory. No syslog marks with the message Out of…
-
6
votes3
answers18812
viewsRunning command with another user within a shell script
I have a shell script that I need to run some commands with a linux user, and some other commands with another user. Something more or less like this: #!/bin/bash echo 'rodando com usuário A'…
-
6
votes1
answer180
viewsSelect database record for variable
The code below aims to select a database record and save it in a variable for later use of the data: #!/bin/bash dbName='basedados' dbUser='utilizador' dbPass='password' row=$(echo "select file_id,…
-
6
votes2
answers12917
viewsWhat is the difference between a symbolic link and a hard link?
In the Unix context, what is the difference between a symbolic link (soft link) and a hard link and which commands are used to create them?
-
6
votes3
answers9222
views -
6
votes3
answers316
viewsOpensuse 13.2 - Sublime as standard editor
I downloaded the sublimeText2 for text editing and would like to define it as the default editor instead of the gedit but I’m not getting it. Attempts Arquivo -> abrir com -> outro aplicativo…
-
6
votes3
answers3015
views -
6
votes3
answers1605
viewsCan you access the bash on Android?
I’m not an expert on Linux. But if Android uses the Linux kernel, it is understood that there must be some similarities. The terminal would be one of them?
-
6
votes2
answers143
viewsCopy all before the first blank line
I have a file with several text blocks, separated by blank line. Ex.: block1 block1 block2 block3 block3 I need a solution with sed, awk or perl that locates the first blank line and redirects the…
-
6
votes2
answers1187
viewsHow to configure crontab to run URL, Linux Ubuntu command
I created 4 methods and I want to run them by accessing the link. I have already tested the methods and all are working normally, but I have tried several settings by crontab -e. I’ve tried to: 0 *…
-
6
votes2
answers1377
viewsHow to identify a USB device?
I have two types of devices (A and B) that communicate serial through USB and can be connected to the PC using linux. Is there a way to identify which device is connected without having to talk to…
-
6
votes1
answer787
viewsHow to find out if a directory is empty by the terminal?
I sent some files, via ftp, to put my application into production. Due to some error occurred in the application, I realized that some files were missing. When I gave a ls I realized that some…
-
6
votes2
answers12143
viewsHow to change the Linux time by the command line?
I can see Linux time from the command line like this: >date Qua Mai 25 14:49:58 BRT 2016 But now I need to change the Linux time by the command line, because as I use a Linux server, I only have…
linuxasked 8 years, 6 months ago Wallace Maxters 102,340 -
6
votes2
answers1375
viewsAndroid Studio - No accent appears
Hello, I have a very strange error in Android Studio, suddenly it stopped accepting the accents in the string and comments, when I try to type for example "is" it shows only "a". I’ve tried…
-
6
votes1
answer1399
viewsWhat is the difference between Alt, poweroff and reboot?
I have heard several times that if I want to shut down/restart the computer from the terminal just run one of these options : Halt poweroff reboot poweroff and reboot are very intuitive "shut down"…
linuxasked 7 years, 4 months ago Guilherme Lautert 15,097 -
6
votes2
answers49314
viewsCommands to update Ubuntu apt-get update or apt update sem get?
In the company we received the instruction to run the following commands every morning, but the current project manager did not know how to answer me the reason and in the internet search I did not…
-
5
votes1
answer191
viewsSimulate another environment by using the `Composer update`command
I have a project Symfony2 with facilities managed by composer, with their respective files composer.json and composer.lock synchronized between my local machine and the production server via git. It…
-
5
votes4
answers640
viewsInstallable PHP application architecture
I am trying to improve my PHP applications. In this goal I would like to create an installer for a web application, a website for example. I already know linux packages like rpm and deb, that’s not…
-
5
votes2
answers1093
viewsHow to compile a *.c file with Clang to signal problems?
In GCC I typed in the terminal: gcc -wall -o nomedoarquivo.c nomedoexecutavel or if you only had 1 file . c [OBS.: typed "a" to make it easier in the]: gcc -wall -o *.c a The restriction I used, if…
-
5
votes3
answers22495
viewsHow do I start Tomcat as a service on Linux?
I need to put a WEB system into production using the Tomcat 7. I know I can start with the shell catalina.sh start but I would like something to work after the reboot and Tomcat to come in normally.…
-
5
votes4
answers9489
viewsHow to call a new terminal from a shell script?
I would like to know how to call a new terminal/xterm from within a command in the shell script, so that the shell script that called the other script keeps running non-stop. Does anyone have any…
-
5
votes1
answer170
viewsHow is the Linux kernel or programs written in C tested?
When we use Java, we use Junit to test codes. But codes written in C, such as kernel Linux, how it is tested?
-
5
votes1
answer181
viewsCreation and communication with daemon
I have a Python application where I need to keep it online all the time. The application has its own console, which is where I do the communication and step parameters. I understood that I can…
-
5
votes1
answer245
viewsError [Forbidden] when sending event in google calendar, googleCL API
For those who do not know, the googleCl(Command line tools for the Google Data Apis) follow the link https://code.google.com/p/googlecl/ I use only the command that sends an event to my google…
-
5
votes3
answers586
viewsFind files containing string and rename
To locate files whose name contains a particular string, we can resort to find as follows: File example: 1429331804.H568641P9577.xxxx.example.com,S=17846:2, Command to locate by xxxx.example.com:…
-
5
votes1
answer255
viewsgoogle API - gcalcli - error running in a script
Carrying on my problem reported here now I can send events from shell-script directly to google calendar, I made a script to run as scheduled, follow file sms.sh down below #!/bin/bash let…
-
5
votes2
answers10495
viewsHow to get the number of processors and cores from the terminal?
How to check the number of processors (Cpus) and cores by the Linux terminal?
-
5
votes3
answers1118
viewsKey capture
I’m developing a C-language cover game (gcc 4.9.2) to the Ubuntu terminal 15.04. I need to capture a key typed by the user so that he can change the direction in which the topsail anda (wupward, s…
-
5
votes2
answers941
viewsScript or command to sum all directories and show full size
I am developing a script where from a text list where will have the name of directories, the script take the name of each directory, show the size of each directory and then the total. Example: I…
-
5
votes4
answers64762
viewsMysql installation socket error
I am unable to uninstall or make Mysql 5.5 work on my Ubuntu Linux 14.04.LTS, every time I try to access it, I get the following message: ERROR 2002 (HY000): Can’t connect to local Mysql server…
-
5
votes1
answer613
viewsHow to create a symbolic link to a Python code on Linux?
I want to run a simple Python code I created from anywhere on my system. I know to do this with a shell script just turn the command ln -s /home/user/script.sh /usb/bin/script, but would like to…
-
5
votes1
answer489
viewsError installing mongodb 3.0 on Ubuntu 15.10 Linux?
I’m trying to install the MongoDB in the Ubuntu 15.10, but, I cannot install Mongo always returning the following error when starting the service. Failed to start mongod.service: Unit mongod.service…
-
5
votes2
answers513
viewsIs there a difference between compiling from the linux terminal or from the IDE?
I’m programming in C in the linux for a semester now, and I always come across people who call themselves better programmers because they compile and run the program through the terminal. However,…
-
5
votes1
answer58870
viewsHow to know if a port is open or not on Linux
I have a PHP script that acts as a chat server (websocket) that I have on a given system. I realize that sometimes unexpectedly this service stops running. It runs through the command nohup. I am…
-
5
votes2
answers883
viewsAWS - Remote access to the instance
Good! I created a Linux instance Amazon and a Windows, followed all the steps to generate key, import and change it via Putty, opened the key, asked for the connection with the care of ec2-user bla…
-
5
votes1
answer1139
viewsClose console window in C
I need to create the old game. I want to know how to close the black window that appears without having to click any key, for example: When running the program appears: 1 to play 0 to leave If the…
-
5
votes1
answer462
viewsHow to solve the problem of PHP 5.6 with obsolete PPA on Linux?
I went to spin the remote sudo apt-get upgrade and I got the PHP PPA discontinuation message. After updating the PHP version, when I run php -v, appears the following: PHP…
-
5
votes3
answers461
viewsHow to run . sh file on button
It is possible to run a file that .sh in a button , example: /bin/importa.sh in a <a href""></a> also serves.
-
5
votes1
answer156
viewsHow to uninstall a tar.bz2 package?
I recently installed the ghdl in my Debian x64, but I installed the wrong version, so I uninstalled the ghdl and installed the version for x64 bits; but the old ghdl (version 0.29) continues on the…
-
5
votes1
answer2120
viewsNetbeans Error When Creating Project
My mistake is in the IDE, I’m using Debian Jessie, I decided to use it recently. The Netbeans installation went perfectly, the JDK installation too, but it gives me this error: I tried to reinstall…
-
5
votes2
answers1001
viewsHow to debug shell script in linux?
I’m new to linux, and I’m learning shell script and my question is this:. When I want to debug something in PHP for example, I put a breakpoint in the code and run the same with the debug on, I…
-
5
votes1
answer227
viewsReturn 0 on Linux and Windows
I am starting the ADS course and my programming teacher insists on using the return 0 at the end of the function. Most use Windows, I realized that the return 0 is required on Windows but on Ubuntu…
-
5
votes3
answers80
viewsDeleting parts of a Text
Galera is the following wanted to be able to extract only the name of the user in a Shell SCRIPT but must be through the text I inform. I exactly wanted to display on screen only: meucliente From…
-
5
votes1
answer9357
viewsRun JNLP Ubuntu
My current version of java is as follows: openjdk version "1.8.0_131" OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11) OpenJDK 64-Bit Server VM (build 25.131-b11, mixed…
-
5
votes1
answer139
views -
5
votes2
answers156
viewsExecution of programs in pararelo WITHOUT use of Threads
They ask me to develop a Java program, to run programs (ls, firefox) in parallel that are contained in a file. For now I have the following code: File file = new File()`; List<String> lista =…
-
5
votes2
answers872
viewsHow to prevent http auto-redirect to https?
My web development container uses the image php:7.1-apache. To make it easier to memorize the address of the applications contained in this container, I like to edit my machine’s Hosts file and make…
-
5
votes2
answers3295
viewsHow do I stop sending package-lock.json by gitignore?
I can’t "ignore" sending package-lock.json for gitlab, when I run git status it appears to me to be sent. Follow a print showing the .gitignore and my terminal when running git status. File .…