title
stringlengths
24
151
question
stringlengths
12
528
answer
stringlengths
33
9.55k
url
stringlengths
61
126
linux - Expand a possible relative path in bash
As arguments to my script there are some file paths. Those can, of course, be relative (or contain ~). But for the functions I've written I need paths that are absolute, but do not have their symlinks resolved.
MY_PATH=$(readlink -f $YOUR_ARG) will resolve relative paths like "./" and "../" Consider this as well (source): #!/bin/bash dir_resolve() { cd "$1" 2>/dev/null || return $? # cd to desired directory; if fail, quell any error messages but return exit status echo "`pwd -P`" # output full, link-resolved path } # sampl...
https://stackoverflow.com//questions/7126580/expand-a-possible-relative-path-in-bash
linux - 64 bit ntohl() in C++?
The man pages for htonl() seem to suggest that you can only use it for up to 32 bit values. (In reality, ntohl() is defined for unsigned long, which on my platform is 32 bits. I suppose if the unsigned long were 8 bytes, it would work for 64 bit ints).
Documentation: man htobe64 on Linux (glibc >= 2.9) or FreeBSD. Unfortunately OpenBSD, FreeBSD and glibc (Linux) did not quite work together smoothly to create one (non-kernel-API) libc standard for this, during an attempt in 2009. Currently, this short bit of preprocessor code: #if defined(__linux__) # include <endia...
https://stackoverflow.com//questions/809902/64-bit-ntohl-in-c
c++ - How do you find what version of libstdc++ library is installed on your linux machine?
I found the following command: strings /usr/lib/libstdc++.so.6 | grep GLIBC from here. It seems to work but this is an ad-hoc/heuristic method.
To find which library is being used you could run $ /sbin/ldconfig -p | grep stdc++ libstdc++.so.6 (libc6) => /usr/lib/libstdc++.so.6 The list of compatible versions for libstdc++ version 3.4.0 and above is provided by $ strings /usr/lib/libstdc++.so.6 | grep LIBCXX GLIBCXX_3.4 GLIBCXX_3.4.1 GLIBCXX_3.4.2 ....
https://stackoverflow.com//questions/10354636/how-do-you-find-what-version-of-libstdc-library-is-installed-on-your-linux-mac
How to find Java Heap Size and Memory Used (Linux)?
How can I check Heap Size (and Used Memory) of a Java Application on Linux through the command line?
Each Java process has a pid, which you first need to find with the jps command. Once you have the pid, you can use jstat -gc [insert-pid-here] to find statistics of the behavior of the garbage collected heap. jstat -gccapacity [insert-pid-here] will present information about memory pool generation and space capabili...
https://stackoverflow.com//questions/12797560/how-to-find-java-heap-size-and-memory-used-linux
Randomly shuffling lines in Linux / Bash
I have some files in linux. For example 2 and i need shuffling the files in one file.
You should use shuf command =) cat file1 file2 | shuf Or with Perl : cat file1 file2 | perl -MList::Util=shuffle -wne 'print shuffle <>;'
https://stackoverflow.com//questions/17578873/randomly-shuffling-lines-in-linux-bash
What is RSS and VSZ in Linux memory management
What are RSS and VSZ in Linux memory management? In a multithreaded environment how can both of these can be managed and tracked?
RSS is the Resident Set Size and is used to show how much memory is allocated to that process and is in RAM. It does not include memory that is swapped out. It does include memory from shared libraries as long as the pages from those libraries are actually in memory. It does include all stack and heap memory. VSZ i...
https://stackoverflow.com//questions/7880784/what-is-rss-and-vsz-in-linux-memory-management
linux - Copy text from nano editor to shell
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Nano to Shell: 1. Using mouse to mark the text. 2. Right-Click the mouse in the Shell. Within Nano: 1. CTRL+6 (or CTRL+Shift+6 or hold Shift and move cursor) for Mark Set and mark what you want (the end could do some extra help). 2. ALT+6 for copying the marked text. 3. CTRL+u at the place you want to paste. or 1. CTR...
https://stackoverflow.com//questions/30507022/copy-text-from-nano-editor-to-shell
How to send HTML email using linux command line
I need to send email with html format. I have only linux command line and command "mail".
This worked for me: echo "<b>HTML Message goes here</b>" | mail -s "$(echo -e "This is the subject\nContent-Type: text/html")" foo@example.com
https://stackoverflow.com//questions/2591755/how-to-send-html-email-using-linux-command-line
Good Linux (Ubuntu) SVN client
Subversion has a superb client on Windows (Tortoise, of course). Everything I've tried on Linux just - well - sucks in comparison....
Disclaimer: A long long time ago I was one of the developers for RabbitVCS (previously known as NautilusSvn). If you use Nautilus then you might be interested in RabbitVCS (mentioned earlier by Trevor Bramble). It's an unadulterated clone of TortoiseSVN for Nautilus written in Python. While there's still a lot of impr...
https://stackoverflow.com//questions/86550/good-linux-ubuntu-svn-client
linux - couldn't connect to server 127.0.0.1 shell/mongo.js
when i setup mongodb in my ubuntu , i try : ./mongo it show this error :
Manually remove the lockfile: sudo rm /var/lib/mongodb/mongod.lock Run the repair script: sudo -u mongodb mongod -f /etc/mongodb.conf --repair Please note the following: You must run this command as the mongodb user. If you run it as root, then root will own files in /var/lib/mongodb/ that are necessary to run t...
https://stackoverflow.com//questions/5726032/couldnt-connect-to-server-127-0-0-1-shell-mongo-js
linux - Run Python script at startup in Ubuntu
I have a short Python script that needs to run at startup - Ubuntu 13.10. I have tried everything I can think of but can't get it to run. The script:
Instructions Copy the python file to /bin: sudo cp -i /path/to/your_script.py /bin Add A New Cron Job: sudo crontab -e Scroll to the bottom and add the following line (after all the #'s): @reboot python /bin/your_script.py & The “&” at the end of the line means the command is run in the background and it won’t stop t...
https://stackoverflow.com//questions/24518522/run-python-script-at-startup-in-ubuntu
linux - Read and write to binary files in C?
Does anyone have an example of code that can write to a binary file. And also code that can read a binary file and output to screen. Looking at examples I can write to a file ok But when I try to read from a file it is not outputting correctly.
Reading and writing binary files is pretty much the same as any other file, the only difference is how you open it: unsigned char buffer[10]; FILE *ptr; ptr = fopen("test.bin","rb"); // r for read, b for binary fread(buffer,sizeof(buffer),1,ptr); // read 10 bytes to our buffer You said you can read it, but it's no...
https://stackoverflow.com//questions/17598572/read-and-write-to-binary-files-in-c
How do I find all the files that were created today in Unix/Linux?
How do I find all the files that were create only today and not in 24 hour period in unix/linux
On my Fedora 10 system, with findutils-4.4.0-1.fc10.i386: find <path> -daystart -ctime 0 -print The -daystart flag tells it to calculate from the start of today instead of from 24 hours ago. Note however that this will actually list files created or modified in the last day. find has no options that look at the true...
https://stackoverflow.com//questions/801095/how-do-i-find-all-the-files-that-were-created-today-in-unix-linux
How to send HTML email using linux command line
I need to send email with html format. I have only linux command line and command "mail".
This worked for me: echo "<b>HTML Message goes here</b>" | mail -s "$(echo -e "This is the subject\nContent-Type: text/html")" foo@example.com
https://stackoverflow.com//questions/2591755/how-to-send-html-email-using-linux-command-line
ruby on rails - cache resources exhausted Imagemagick
I'm using Imagemagick on a rails app with Minimagick and I generate some pictogram with it.
Find the policy.xml with find / -name "policy.xml" something like /etc/ImageMagick-6/policy.xml and change <policy domain="resource" name="disk" value="1GiB"/> to <policy domain="resource" name="disk" value="8GiB"/> refer to convert fails due to resource limits Memory issues
https://stackoverflow.com//questions/31407010/cache-resources-exhausted-imagemagick
linux - Compare integer in bash, unary operator expected
The following code gives
Your problem arises from the fact that $i has a blank value when your statement fails. Always quote your variables when performing comparisons if there is the slightest chance that one of them may be empty, e.g.: if [ "$i" -ge 2 ] ; then ... fi This is because of how the shell treats variables. Assume the origina...
https://stackoverflow.com//questions/408975/compare-integer-in-bash-unary-operator-expected
Quickly create a large file on a Linux system
How can I quickly create a large file on a Linux (Red Hat Linux) system?
dd from the other answers is a good solution, but it is slow for this purpose. In Linux (and other POSIX systems), we have fallocate, which uses the desired space without having to actually writing to it, works with most modern disk based file systems, very fast: For example: fallocate -l 10G gentoo_root.img
https://stackoverflow.com//questions/257844/quickly-create-a-large-file-on-a-linux-system
linux - How to get memory usage at runtime using C++?
I need to get the mem usage VIRT and RES at run time of my program and display them.
On Linux, I've never found an ioctl() solution. For our applications, we coded a general utility routine based on reading files in /proc/pid. There are a number of these files which give differing results. Here's the one we settled on (the question was tagged C++, and we handled I/O using C++ constructs, but it should...
https://stackoverflow.com//questions/669438/how-to-get-memory-usage-at-runtime-using-c
bash - How to change the output color of echo in Linux
I am trying to print a text in the terminal using echo command.
You can use these ANSI escape codes: Black 0;30 Dark Gray 1;30 Red 0;31 Light Red 1;31 Green 0;32 Light Green 1;32 Brown/Orange 0;33 Yellow 1;33 Blue 0;34 Light Blue 1;34 Purple 0;35 Light Purple 1;35 Cyan 0;36 Light Cyan ...
https://stackoverflow.com//questions/5947742/how-to-change-the-output-color-of-echo-in-linux
linux - rsync not synchronizing .htaccess file
I am trying to rsync directory A of server1 with directory B of server2.
This is due to the fact that * is by default expanded to all files in the current working directory except the files whose name starts with a dot. Thus, rsync never receives these files as arguments. You can pass . denoting current working directory to rsync: rsync -av . server2::sharename/B This way rsync will look ...
https://stackoverflow.com//questions/9046749/rsync-not-synchronizing-htaccess-file
How do I get Windows to go as fast as Linux for compiling C++?
I know this is not so much a programming question but it is relevant.
Unless a hardcore Windows systems hacker comes along, you're not going to get more than partisan comments (which I won't do) and speculation (which is what I'm going to try). File system - You should try the same operations (including the dir) on the same filesystem. I came across this which benchmarks a few filesyst...
https://stackoverflow.com//questions/6916011/how-do-i-get-windows-to-go-as-fast-as-linux-for-compiling-c
linux - Find unique lines
How can I find the unique lines and remove all duplicates from a file? My input file is
uniq has the option you need: -u, --unique only print unique lines $ cat file.txt 1 1 2 3 5 5 7 7 $ uniq -u file.txt 2 3
https://stackoverflow.com//questions/13778273/find-unique-lines
What does the "no version information available" error from linux dynamic linker mean?
In our product we ship some linux binaries that dynamically link to system libraries like "libpam". On some customer systems we get the following error on stderr when the program runs:
The "no version information available" means that the library version number is lower on the shared object. For example, if your major.minor.patch number is 7.15.5 on the machine where you build the binary, and the major.minor.patch number is 7.12.1 on the installation machine, ld will print the warning. You can fix ...
https://stackoverflow.com//questions/137773/what-does-the-no-version-information-available-error-from-linux-dynamic-linker
linux - How to update-alternatives to Python 3 without breaking apt?
The other day I decided that I wanted the command python to default to firing up python3 instead of python2.
Per Debian policy, python refers to Python 2 and python3 refers to Python 3. Don't try to change this system-wide or you are in for the sort of trouble you already discovered. Virtual environments allow you to run an isolated Python installation with whatever version of Python and whatever libraries you need without m...
https://stackoverflow.com//questions/43062608/how-to-update-alternatives-to-python-3-without-breaking-apt
Is there a way to figure out what is using a Linux kernel module?
If I load a kernel module and list the loaded modules with lsmod, I can get the "use count" of the module (number of other modules with a reference to the module). Is there a way to figure out what is using a module, though?
Actually, there seems to be a way to list processes that claim a module/driver - however, I haven't seen it advertised (outside of Linux kernel documentation), so I'll jot down my notes here: First of all, many thanks for @haggai_e's answer; the pointer to the functions try_module_get and try_module_put as those respo...
https://stackoverflow.com//questions/448999/is-there-a-way-to-figure-out-what-is-using-a-linux-kernel-module
linux - Docker can't connect to docker daemon
After I update my Docker version to 0.8.0, I get an error message while entering sudo docker version:
Linux The Post-installation steps for Linux documentation reveals the following steps: Create the docker group. sudo groupadd docker Add the user to the docker group. sudo usermod -aG docker $(whoami) Log out and log back in to ensure docker runs with correct permissions. Start docker. sudo service docker start Mac ...
https://stackoverflow.com//questions/21871479/docker-cant-connect-to-docker-daemon
linux - Keep the window's name fixed in tmux
I want to keep the windows' name fixed after I rename it. But after I renaming it, they keep changing when I execute commands.
As shown in a comment to the main post: set-option -g allow-rename off in your .tmux.conf file
https://stackoverflow.com//questions/6041178/keep-the-windows-name-fixed-in-tmux
linux - How do I uninstall a program installed with the Appimage Launcher?
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Since an AppImage is not "installed", you don't need to "uninstall" it. Just delete the AppImage file and the application is gone. Additionally you may want to remove menu entry by deleting the desktop file from $HOME/.local/share/applications/. Files and directories with names starting with a full stop (dot) (.examp...
https://stackoverflow.com//questions/43680226/how-do-i-uninstall-a-program-installed-with-the-appimage-launcher
linux - git submodule update failed with 'fatal: detected dubious ownership in repository at'
I mounted a new hdd in my linux workstation. It looks working well. I want to download some repo in the new disk. So I execute git clone XXX, and it works well. But when I cd in the folder, and execute git submodule update --init --recursive. It failed with
Silence all safe.directory warnings tl;dr Silence all warnings related to git's safe.directory system. Be sure to understand what you're doing. git config --global --add safe.directory '*' Long version Adapted from this post on I cannot add the parent directory to safe.directory in Git. I had the same issue and resol...
https://stackoverflow.com//questions/72978485/git-submodule-update-failed-with-fatal-detected-dubious-ownership-in-repositor
linux - Difference between checkout and export in SVN
What is the exact difference between SVN checkout and SVN export?
svn export simply extracts all the files from a revision and does not allow revision control on it. It also does not litter each directory with .svn directories. svn checkout allows you to use version control in the directory made, e.g. your standard commands such as svn update and svn commit.
https://stackoverflow.com//questions/419467/difference-between-checkout-and-export-in-svn
linux - How do I SET the GOPATH environment variable on Ubuntu? What file must I edit?
I am trying to do a go get:
New Way: Check out this answer. Note: Not for trying out a go application / binaries on your host machine using go install [repo url], in such cases you still have to use the old way. Old Way: Just add the following lines to ~/.bashrc and this will persist. However, you can use other paths you like as GOPATH instead o...
https://stackoverflow.com//questions/21001387/how-do-i-set-the-gopath-environment-variable-on-ubuntu-what-file-must-i-edit
memory - Understanding the Linux oom-killer's logs
My app was killed by the oom-killer. It is Ubuntu 11.10 running on a live USB with no swap and the PC has 1 Gig of RAM. The only app running (other than all the built in Ubuntu stuff) is my program flasherav. Note that /tmp is memory mapped and at the time of the crash had about 200MB of files in it (so was taking u...
Memory management in Linux is a bit tricky to understand, and I can't say I fully understand it yet, but I'll try to share a little bit of my experience and knowledge. Short answer to your question: Yes there are other stuff included than whats in the list. What's being shown in your list is applications run in usersp...
https://stackoverflow.com//questions/9199731/understanding-the-linux-oom-killers-logs
linux - Total size of the contents of all the files in a directory
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
If you want the 'apparent size' (that is the number of bytes in each file), not size taken up by files on the disk, use the -b or --bytes option (if you got a Linux system with GNU coreutils): % du -sbh <directory>
https://stackoverflow.com//questions/1241801/total-size-of-the-contents-of-all-the-files-in-a-directory
linux - select vs poll vs epoll
I am designing a new server which needs to support thousands of UDP connections (somewhere around 100,000 sessions). Any input or suggestions on which one to use?
The answer is epoll if you're using Linux, kqueue if you're using FreeBSD or Mac OS X, and i/o completion ports if you're on Windows. Some additional things you'll (almost certainly) want to research are: Load balancing techniques Multi-threaded networking Database architecture Perfect hash tables Additionally, it i...
https://stackoverflow.com//questions/4039832/select-vs-poll-vs-epoll
math - How do I divide in the Linux console?
I have to variables and I want to find the value of one divided by the other. What commands should I use to do this?
In the bash shell, surround arithmetic expressions with $(( ... )) $ echo $(( 7 / 3 )) 2 Although I think you are limited to integers.
https://stackoverflow.com//questions/1088098/how-do-i-divide-in-the-linux-console
linux - FUSE error: Transport endpoint is not connected
I'm trying to implement the FUSE filesystem. I am receiving this error:
This typically is caused by the mount directory being left mounted due to a crash of your filesystem. Go to the parent directory of the mount point and enter fusermount -u YOUR_MNT_DIR. If this doesn't do the trick, do sudo umount -l YOUR_MNT_DIR.
https://stackoverflow.com//questions/16002539/fuse-error-transport-endpoint-is-not-connected
linux - How to recursively find and list the latest modified files in a directory with subdirectories and times
Operating system: Linux
Try this one: #!/bin/bash find $1 -type f -exec stat --format '%Y :%y %n' "{}" \; | sort -nr | cut -d: -f2- | head Execute it with the path to the directory where it should start scanning recursively (it supports filenames with spaces). If there are lots of files it may take a while before it returns anything. Perfor...
https://stackoverflow.com//questions/5566310/how-to-recursively-find-and-list-the-latest-modified-files-in-a-directory-with-s
How to remove ^[, and all of the escape sequences in a file using linux shell scripting
We want to remove ^[, and all of the escape sequences.
Are you looking for ansifilter? Two things you can do: enter the literal escape (in bash:) Using keyboard entry: sed 's/Ctrl-vEsc//g' alternatively sed 's/Ctrl-vCtrl-[//g' Or you can use character escapes: sed 's/\x1b//g' or for all control characters: sed 's/[\x01-\x1F\x7F]//g' # NOTE: zaps TAB character too!
https://stackoverflow.com//questions/6534556/how-to-remove-and-all-of-the-escape-sequences-in-a-file-using-linux-shell-sc
java - Moving from JDK 1.7 to JDK 1.8 on Ubuntu
I am on UBUNTU. JDK version currently installed is:
This is what I do on debian - I suspect it should work on ubuntu (amend the version as required + adapt the folder where you want to copy the JDK files as you wish, I'm using /opt/jdk): wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u71-b15/jdk-8u71-linux-...
https://stackoverflow.com//questions/30177455/moving-from-jdk-1-7-to-jdk-1-8-on-ubuntu
c - Is it possible to determine the thread holding a mutex?
Firstly, I use pthread library to write multithreading C programs. Threads always hung by their waited mutexes. When I use the strace utility to find a thread in the FUTEX_WAIT status, I want to know which thread holds that mutex at that time. But I don't know how I could I do it. Are there any utilities that could do ...
You can use knowledge of the mutex internals to do this. Ordinarily this wouldn't be a very good idea, but it's fine for debugging. Under Linux with the NPTL implementation of pthreads (which is any modern glibc), you can examine the __data.__owner member of the pthread_mutex_t structure to find out the thread that c...
https://stackoverflow.com//questions/3483094/is-it-possible-to-determine-the-thread-holding-a-mutex
linux - When grep "\\" XXFile I got "Trailing Backslash"
Now I want to find whether there are lines containing '\' character. I tried grep "\\" XXFile but it hints "Trailing Backslash". But when I tried grep '\\' XXFile it is OK. Could anyone explain why the first case cannot run? Thanks.
The difference is in how the shell treats the backslashes: When you write "\\" in double quotes, the shell interprets the backslash escape and ends up passing the string \ to grep. Grep then sees a backslash with no following character, so it emits a "trailing backslash" warning. If you want to use double quotes you ...
https://stackoverflow.com//questions/20342464/when-grep-xxfile-i-got-trailing-backslash
linux - shell-init: error retrieving current directory: getcwd -- The usual fixes do not wor
I have a simple script:
I believe the error is not related to the script at all. The issue is: the directory at which you are when you try to run the script does not exist anymore. for example you have two terminals, cd somedir/ at the first one then mv somedir/ somewhere_else/ at the second one, then try to run whatsoever in the first termi...
https://stackoverflow.com//questions/29396928/shell-init-error-retrieving-current-directory-getcwd-the-usual-fixes-do-not
c - Turn a simple socket into an SSL socket
I wrote simple C programs, which are using sockets ('client' and 'server'). (UNIX/Linux usage)
There are several steps when using OpenSSL. You must have an SSL certificate made which can contain the certificate with the private key be sure to specify the exact location of the certificate (this example has it in the root). There are a lot of good tutorials out there. Some documentation and tools from HP (see ch...
https://stackoverflow.com//questions/7698488/turn-a-simple-socket-into-an-ssl-socket
linux - PGP: Not enough random bytes available. Please do some other work to give the OS a chance to collect more entropy
Setup : Ubuntu Server on Virtual Machine with 6 cores and 3GB of RAM.
Run the following: find / > /dev/null That helped me quickly to complete my key generation.
https://stackoverflow.com//questions/11708334/pgp-not-enough-random-bytes-available-please-do-some-other-work-to-give-the-os
linux - FUSE error: Transport endpoint is not connected
I'm trying to implement the FUSE filesystem. I am receiving this error:
This typically is caused by the mount directory being left mounted due to a crash of your filesystem. Go to the parent directory of the mount point and enter fusermount -u YOUR_MNT_DIR. If this doesn't do the trick, do sudo umount -l YOUR_MNT_DIR.
https://stackoverflow.com//questions/16002539/fuse-error-transport-endpoint-is-not-connected
linux - How to find files modified in last x minutes (find -mmin does not work as expected)
I'm trying to find files modified in last x minutes, for example in the last hour. Many forums and tutorials on the net suggest to use the find command with the -mmin option, like this:
I can reproduce your problem if there are no files in the directory that were modified in the last hour. In that case, find . -mmin -60 returns nothing. The command find . -mmin -60 |xargs ls -l, however, returns every file in the directory which is consistent with what happens when ls -l is run without an argument. ...
https://stackoverflow.com//questions/33407344/how-to-find-files-modified-in-last-x-minutes-find-mmin-does-not-work-as-expect
linux - Hourly rotation of files using logrotate?
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
The manpage of logrotate.conf contains an important advice for the hourly option: Log files are rotated every hour. Note that usually logrotate is configured to be run by cron daily. You have to change this configuration and run logrotate hourly to be able to really rotate logs hourly. As pointed out by yellow1pl t...
https://stackoverflow.com//questions/25485047/hourly-rotation-of-files-using-logrotate
linux - make -j 8 g++: internal compiler error: Killed (program cc1plus)
When I deploy Apache Mesos on Ubuntu12.04, I follow the official document, in step "make -j 8" I'm getting this error in the console:
Try running (just after the failure) dmesg. Do you see a line like this? Out of memory: Kill process 23747 (cc1plus) score 15 or sacrifice child Killed process 23747, UID 2243, (cc1plus) total-vm:214456kB, anon-rss:178936kB, file-rss:5908kB Most likely that is your problem. Running make -j 8 runs lots of process whic...
https://stackoverflow.com//questions/30887143/make-j-8-g-internal-compiler-error-killed-program-cc1plus
linux - Difference between Real User ID, Effective User ID and Saved User ID
I am already aware of the real user id. It is the unique number for a user in the system.
The distinction between a real and an effective user id is made because you may have the need to temporarily take another user's identity (most of the time, that would be root, but it could be any user). If you only had one user id, then there would be no way of changing back to your original user id afterwards (other...
https://stackoverflow.com//questions/32455684/difference-between-real-user-id-effective-user-id-and-saved-user-id
Best way to find os name and version in Unix/Linux platform
I need to find the OS name and version on Unix/Linux platform. For this I tried following:
This work fine for all Linux environment. #!/bin/sh cat /etc/*-release In Ubuntu: $ cat /etc/*-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.04 DISTRIB_CODENAME=lucid DISTRIB_DESCRIPTION="Ubuntu 10.04.4 LTS" or 12.04: $ cat /etc/*-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.04 DISTRIB_CODENAME=precise DISTRIB_DESCR...
https://stackoverflow.com//questions/26988262/best-way-to-find-os-name-and-version-in-unix-linux-platform
How to append one file to another in Linux from the shell?
I have two files: file1 and file2. How do I append the contents of file2 to file1 so that contents of file1 persist the process?
Use bash builtin redirection (tldp): cat file2 >> file1
https://stackoverflow.com//questions/4969641/how-to-append-one-file-to-another-in-linux-from-the-shell
linux - How to have the cp command create any necessary folders for copying a file to a destination
When copying a file using cp to a folder that may or may not exist, how do I get cp to create the folder if necessary? Here is what I have tried:
To expand upon Christian's answer, the only reliable way to do this would be to combine mkdir and cp: mkdir -p /foo/bar && cp myfile "$_" As an aside, when you only need to create a single directory in an existing hierarchy, rsync can do it in one operation. I'm quite a fan of rsync as a much more versatile cp repla...
https://stackoverflow.com//questions/947954/how-to-have-the-cp-command-create-any-necessary-folders-for-copying-a-file-to-a
linux - How to search and replace using grep
I need to recursively search for a specified string within all files and subdirectories within a directory and replace this string with another string.
Another option is to use find and then pass it through sed. find /path/to/files -type f -exec sed -i 's/oldstring/new string/g' {} \;
https://stackoverflow.com//questions/15402770/how-to-search-and-replace-using-grep
java - adb devices => no permissions (user in plugdev group; are your udev rules wrong?)
I am getting following error log if I connect my android phone with Android Oreo OS to Linux PC
Check device vendor id and product id: $ lsusb Bus 001 Device 002: ID 8087:8000 Intel Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 078: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader Bus 002 Device 00...
https://stackoverflow.com//questions/53887322/adb-devices-no-permissions-user-in-plugdev-group-are-your-udev-rules-wrong
linux - ssh script returns 255 error
In my code I have the following to run a remote script.
This is usually happens when the remote is down/unavailable; or the remote machine doesn't have ssh installed; or a firewall doesn't allow a connection to be established to the remote host. ssh returns 255 when an error occurred or 255 is returned by the remote script: EXIT STATUS ssh exits with the exit status...
https://stackoverflow.com//questions/14885748/ssh-script-returns-255-error
c++ - How to Add Linux Executable Files to .gitignore?
How do you add Linux executable files to .gitignore without giving them an explicit extension and without placing them in a specific or /bin directory? Most are named the same as the C file from which they were compiled without the .c extension.
Can you ignore all, but source code files? For example: * !*.c !Makefile
https://stackoverflow.com//questions/8237645/how-to-add-linux-executable-files-to-gitignore
linux - counting number of directories in a specific directory
How to count the number of folders in a specific directory. I am using the following command, but it always provides an extra one.
find is also printing the directory itself: $ find .vim/ -maxdepth 1 -type d .vim/ .vim/indent .vim/colors .vim/doc .vim/after .vim/autoload .vim/compiler .vim/plugin .vim/syntax .vim/ftplugin .vim/bundle .vim/ftdetect You can instead test the directory's children and do not descend into them at all: $ find .vim/* -m...
https://stackoverflow.com//questions/17648033/counting-number-of-directories-in-a-specific-directory
linux - How to find files modified in last x minutes (find -mmin does not work as expected)
I'm trying to find files modified in last x minutes, for example in the last hour. Many forums and tutorials on the net suggest to use the find command with the -mmin option, like this:
I can reproduce your problem if there are no files in the directory that were modified in the last hour. In that case, find . -mmin -60 returns nothing. The command find . -mmin -60 |xargs ls -l, however, returns every file in the directory which is consistent with what happens when ls -l is run without an argument. ...
https://stackoverflow.com//questions/33407344/how-to-find-files-modified-in-last-x-minutes-find-mmin-does-not-work-as-expect
linux - How to write stdout to file with colors?
A lot of times (not always) the stdout is displayed in colors. Normally I keep every output log in a different file too. Naturally in the file, the colors are not displayed anymore.
Since many programs will only output color sequences if their stdout is a terminal, a general solution to this problem requires tricking them into believing that the pipe they write to is a terminal. This is possible with the script command from bsdutils: script -q -c "vagrant up" filename.txt This will write the out...
https://stackoverflow.com//questions/27397865/how-to-write-stdout-to-file-with-colors
performance - Threads vs Processes in Linux
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Linux uses a 1-1 threading model, with (to the kernel) no distinction between processes and threads -- everything is simply a runnable task. * On Linux, the system call clone clones a task, with a configurable level of sharing, among which are: CLONE_FILES: share the same file descriptor table (instead of creating a ...
https://stackoverflow.com//questions/807506/threads-vs-processes-in-linux
web services - HTTP POST and GET using cURL in Linux
I have a server application written in ASP.NET on Windows that provides a web service.
*nix provides a nice little command which makes our lives a lot easier. GET: with JSON: curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://hostname/resource with XML: curl -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET http://hostname/resource POST: For po...
https://stackoverflow.com//questions/14978411/http-post-and-get-using-curl-in-linux
c - Is it possible to determine the thread holding a mutex?
Firstly, I use pthread library to write multithreading C programs. Threads always hung by their waited mutexes. When I use the strace utility to find a thread in the FUTEX_WAIT status, I want to know which thread holds that mutex at that time. But I don't know how I could I do it. Are there any utilities that could do ...
You can use knowledge of the mutex internals to do this. Ordinarily this wouldn't be a very good idea, but it's fine for debugging. Under Linux with the NPTL implementation of pthreads (which is any modern glibc), you can examine the __data.__owner member of the pthread_mutex_t structure to find out the thread that c...
https://stackoverflow.com//questions/3483094/is-it-possible-to-determine-the-thread-holding-a-mutex
Comparing Unix/Linux IPC
Lots of IPCs are offered by Unix/Linux: pipes, sockets, shared memory, dbus, message-queues...
Unix IPC Here are the big seven: Pipe Useful only among processes related as parent/child. Call pipe(2) and fork(2). Unidirectional. FIFO, or named pipe Two unrelated processes can use FIFO unlike plain pipe. Call mkfifo(3). Unidirectional. Socket and Unix Domain Socket Bidirectional. Meant for network communication,...
https://stackoverflow.com//questions/404604/comparing-unix-linux-ipc
python - How to activate virtualenv in Linux?
I have been searching and tried various alternatives without success and spent several days on it now - driving me mad.
Here is my workflow after creating a folder and cd'ing into it: $ virtualenv venv --distribute New python executable in venv/bin/python Installing distribute.........done. Installing pip................done. $ source venv/bin/activate (venv)$ python
https://stackoverflow.com//questions/14604699/how-to-activate-virtualenv-in-linux
node.js - MongoError: connect ECONNREFUSED 127.0.0.1:27017
I'm using NodeJS wih MongoDB using mongodb package. When I run mongod command it works fine and gives "waiting for connection on port 27017". So, mongod seems to be working. But MongoClient does not work and gives error when I run node index.js command-
This happened probably because the MongoDB service isn't started. Follow the below steps to start it: Go to Control Panel and click on Administrative Tools. Double click on Services. A new window opens up. Search MongoDB.exe. Right click on it and select Start. The server will start. Now execute npm start again and...
https://stackoverflow.com//questions/46523321/mongoerror-connect-econnrefused-127-0-0-127017
linux - How can I open some ports on Ubuntu?
I know a little about Linux. Today I created a VPN server on my Ubuntu installation according to Set up a simple IPsec/L2TP VPN server for Ubuntu, Arch Linux and Debian.
Ubuntu these days comes with UFW - Uncomplicated Firewall. UFW is an easy-to-use method of handling iptables rules. Try using this command to allow a port: sudo ufw allow 1701 To test connectivity, you could try shutting down the VPN software (freeing up the ports) and using netcat to listen, like this: nc -l 1701 T...
https://stackoverflow.com//questions/30251889/how-can-i-open-some-ports-on-ubuntu
linux - How to convert Windows end of line in Unix end of line (CR/LF to LF)
I'm a Java developer and I'm using Ubuntu to develop. The project was created in Windows with Eclipse and it's using the Windows-1252 encoding.
There should be a program called dos2unix that will fix line endings for you. If it's not already on your Linux box, it should be available via the package manager.
https://stackoverflow.com//questions/3891076/how-to-convert-windows-end-of-line-in-unix-end-of-line-cr-lf-to-lf
c - How to capture Control+D signal?
I want to capture the Ctrl+D signal in my program and write a signal handler for it. How can I do that? I am working on C and using a Linux system.
As others have already said, to handle Control+D, handle "end of file"s. Control+D is a piece of communication between the user and the pseudo-file that you see as stdin. It does not mean specifically "end of file", but more generally "flush the input I typed so far". Flushing means that any read() call on stdin in yo...
https://stackoverflow.com//questions/1516122/how-to-capture-controld-signal
python - What is different between makedirs and mkdir of os?
I am confused to use about these two osmethods to create the new directory.
makedirs() creates all the intermediate directories if they don't exist (just like mkdir -p in bash). mkdir() can create a single sub-directory, and will throw an exception if intermediate directories that don't exist are specified. Either can be used to create a single 'leaf' directory (dirA): os.mkdir('dirA') os.ma...
https://stackoverflow.com//questions/13819496/what-is-different-between-makedirs-and-mkdir-of-os
linux - Why doesn't a shell get variables exported by a script run in a subshell?
I have two scripts 1.sh and 2.sh.
If you are executing your files like sh 1.sh or ./1.sh Then you are executing it in a sub-shell. If you want the changes to be made in your current shell, you could do: . 1.sh # OR source 1.sh Please consider going through the reference-documentation. "When a script is run using source [or .] it runs within the exis...
https://stackoverflow.com//questions/10781824/why-doesnt-a-shell-get-variables-exported-by-a-script-run-in-a-subshell
ios - Starting iPhone app development in Linux?
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
To provide a differing response, I'm running OS X and Xcode on a virtualised (VMware) machine on Linux. CPU is a Core2Quad (Q8800), and it is perfectly fast. I found a prebuilt VM online (I'll leave it to you to find) Xcode/iPhone development works perfectly, as does debugging via USB to the phone itself. It actuall...
https://stackoverflow.com//questions/276907/starting-iphone-app-development-in-linux
linux - Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running?
I have applied every solution available on internet but still I cannot run Docker.
You can try out this: systemctl start docker It worked fine for me. P.S.: after if there is commands that you can't do without sudo, try this: gpasswd -a $USER docker
https://stackoverflow.com//questions/44678725/cannot-connect-to-the-docker-daemon-at-unix-var-run-docker-sock-is-the-docker
linux - How to check if X server is running?
Is there any way to find out if the current session user is running an Xserver (under Linux) ?
I often need to run an X command on a server that is running many X servers, so the ps based answers do not work. Naturally, $DISPLAY has to be set appropriately. To check that that is valid, use xset q in some fragment like: if ! xset q &>/dev/null; then echo "No X server at \$DISPLAY [$DISPLAY]" >&2 exit 1 f...
https://stackoverflow.com//questions/637005/how-to-check-if-x-server-is-running
linux - Recursively look for files with a specific extension
I'm trying to find all files with a specific extension in a directory and its subdirectories with my bash (Latest Ubuntu LTS Release).
find "$directory" -type f -name "*.in" is a bit shorter than that whole thing (and safer - deals with whitespace in filenames and directory names). Your script is probably failing for entries that don't have a . in their name, making $extension empty.
https://stackoverflow.com//questions/5927369/recursively-look-for-files-with-a-specific-extension
gzip - Extract and delete all .gz in a directory- Linux
I have a directory. It has about 500K .gz files.
This should do it: gunzip *.gz
https://stackoverflow.com//questions/16038087/extract-and-delete-all-gz-in-a-directory-linux
linux - How to run a process with a timeout in Bash?
Possible Duplicate: Bash script that kills a child process after a given timeout
Use the timeout command: timeout 15s command Note: on some systems you need to install coreutils, on others it's missing or has different command line arguments. See an alternate solution posted by @ArjunShankar . Based on it you can encapsulate that boiler-plate code and create your own portable timeout script or sm...
https://stackoverflow.com//questions/10224939/how-to-run-a-process-with-a-timeout-in-bash
linux - How set multiple env variables for a bash command
I am supposed to set the EC2_HOME and JAVA_HOME variables before running a command (ec2-describe-regions)
You can one-time set vars for a single command by putting them on the command line before the command: $ EC2_HOME=/path/to/dir JAVA_HOME=/other/path ec2-describe-regions Alternately, you can export them in the environment, in which case they'll be set for all future commands: $ export EC2_HOME=/path/to/dir $ export J...
https://stackoverflow.com//questions/26189662/how-set-multiple-env-variables-for-a-bash-command
Can WPF applications be run in Linux or Mac with .Net Core 3?
Microsoft announced .NET Core 3 comes with WPF and Windows Forms. So can I create a desktop application for Linux or Mac using .NET Core 3?
No, they have clearly stated that these are windows only. In one of the .NET Core 3.0 discussions, they have also clarified that they do not intend to make these features cross-platform in the future since the whole concept is derived from windows specific features. They talked about thinking of a whole new idea for c...
https://stackoverflow.com//questions/53954047/can-wpf-applications-be-run-in-linux-or-mac-with-net-core-3
linux - Terminal Multiplexer for Microsoft Windows - Installers for GNU Screen or tmux
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Look. This is way old, but on the off chance that someone from Google finds this, absolutely the best solution to this - (and it is AWESOME) - is to use ConEmu (or a package that includes and is built on top of ConEmu called cmder) and then either use plink or putty itself to connect to a specific machine, or, even b...
https://stackoverflow.com//questions/5473384/terminal-multiplexer-for-microsoft-windows-installers-for-gnu-screen-or-tmux
linux - How to resume interrupted download automatically in curl?
I'm working with curl in Linux. I'm downloading a part of a file in ftp server (using the -r option), but my connection is not good, it always interrupts. I want to write a script which resume download when I'm connected again.
curl -L -O your_url This will download the file. Now let's say your connection is interrupted; curl -L -O -C - your_url This will continue downloading from the last byte downloaded From the manpage: Use "-C -" to tell curl to automatically find out where/how to resume the transfer. It then uses the given output/inp...
https://stackoverflow.com//questions/19728930/how-to-resume-interrupted-download-automatically-in-curl
linux - tar: add all files and directories in current directory INCLUDING .svn and so on
I try to tar.gz a directory and use
Don't create the tar file in the directory you are packing up: tar -czf /tmp/workspace.tar.gz . does the trick, except it will extract the files all over the current directory when you unpack. Better to do: cd .. tar -czf workspace.tar.gz workspace or, if you don't know the name of the directory you were in: base=$...
https://stackoverflow.com//questions/3651791/tar-add-all-files-and-directories-in-current-directory-including-svn-and-so-on
linux - How to check if X server is running?
Is there any way to find out if the current session user is running an Xserver (under Linux) ?
I often need to run an X command on a server that is running many X servers, so the ps based answers do not work. Naturally, $DISPLAY has to be set appropriately. To check that that is valid, use xset q in some fragment like: if ! xset q &>/dev/null; then echo "No X server at \$DISPLAY [$DISPLAY]" >&2 exit 1 f...
https://stackoverflow.com//questions/637005/how-to-check-if-x-server-is-running
linux - what does "bash:no job control in this shell” mean?
I think it's related to the parent process creating new subprocess and does not have tty. Can anyone explain the detail under the hood? i.e. the related working model of bash, process creation, etc?
You may need to enable job control: #! /bin/bash set -m
https://stackoverflow.com//questions/11821378/what-does-bashno-job-control-in-this-shell-mean
user interface - Graphical DIFF programs for linux
I really like Araxis Merge for a graphical DIFF program for the PC. I have no idea what's available for linux, though. We're running SUSE linux on our z800 mainframe. I'd be most grateful if I could get a few pointers to what programs everyone else likes.
I know of two graphical diff programs: Meld and KDiff3. I haven't used KDiff3, but Meld works well for me. It seems that both are in the standard package repositories for openSUSE 11.0
https://stackoverflow.com//questions/112932/graphical-diff-programs-for-linux
linux - Curl Command to Repeat URL Request
Whats the syntax for a linux command that hits a URL repeatedly, x number of times. I don't need to do anything with the data, I just need to replicate hitting refresh 20 times in a browser.
You could use URL sequence substitution with a dummy query string (if you want to use CURL and save a few keystrokes): curl http://www.myurl.com/?[1-20] If you have other query strings in your URL, assign the sequence to a throwaway variable: curl http://www.myurl.com/?myVar=111&fakeVar=[1-20] Check out the URL sect...
https://stackoverflow.com//questions/12409519/curl-command-to-repeat-url-request
Replace whitespaces with tabs in linux
How do I replace whitespaces with tabs in linux in a given text file?
Use the unexpand(1) program UNEXPAND(1) User Commands UNEXPAND(1) NAME unexpand - convert spaces to tabs SYNOPSIS unexpand [OPTION]... [FILE]... DESCRIPTION Convert blanks in each FILE to tabs, writing to standard output. With no FILE, or when ...
https://stackoverflow.com//questions/1424126/replace-whitespaces-with-tabs-in-linux
linux - PGP: Not enough random bytes available. Please do some other work to give the OS a chance to collect more entropy
Setup : Ubuntu Server on Virtual Machine with 6 cores and 3GB of RAM.
Run the following: find / > /dev/null That helped me quickly to complete my key generation.
https://stackoverflow.com//questions/11708334/pgp-not-enough-random-bytes-available-please-do-some-other-work-to-give-the-os
linux - ssh script returns 255 error
In my code I have the following to run a remote script.
This is usually happens when the remote is down/unavailable; or the remote machine doesn't have ssh installed; or a firewall doesn't allow a connection to be established to the remote host. ssh returns 255 when an error occurred or 255 is returned by the remote script: EXIT STATUS ssh exits with the exit status...
https://stackoverflow.com//questions/14885748/ssh-script-returns-255-error
linux - Can you attach Amazon EBS to multiple instances?
We currently use multiple webservers accessing one mysql server and fileserver. Looking at moving to the cloud, can I use this same setup and attach the EBS to multiple machine instances or what's another solution?
UPDATE (April 2015): For this use-case, you should start looking at the new Amazon Elastic File System (EFS), which is designed to be multiply attached in exactly the way you are wanting. The key difference between EFS and EBS is that they provide different abstractions: EFS exposes the NFSv4 protocol, whereas EBS pr...
https://stackoverflow.com//questions/841240/can-you-attach-amazon-ebs-to-multiple-instances
linux - "/usr/bin/ld: cannot find -lz"
I am trying to compile Android source code under Ubuntu 10.04. I get an error saying,
I had the exact same error, and like you, installing zlib1g-dev did not fix it. Installing lib32z1-dev got me past it. I have a 64 bit system and it seems like it wanted the 32 bit library.
https://stackoverflow.com//questions/3373995/usr-bin-ld-cannot-find-lz
linux - What are stalled-cycles-frontend and stalled-cycles-backend in 'perf stat' result?
Does anybody know what is the meaning of stalled-cycles-frontend and stalled-cycles-backend in perf stat result ? I searched on the internet but did not find the answer. Thanks
The theory: Let's start from this: nowaday's CPU's are superscalar, which means that they can execute more than one instruction per cycle (IPC). Latest Intel architectures can go up to 4 IPC (4 x86 instruction decoders). Let's not bring macro / micro fusion into discussion to complicate things more :). Typically, work...
https://stackoverflow.com//questions/22165299/what-are-stalled-cycles-frontend-and-stalled-cycles-backend-in-perf-stat-resul
I get "dquote>" as a result of executing a program in linux shell
When I execute a script in a Linux shell, I get this output:
It means you've executed a line of code with only one double-quote character, like this: echo "Hello The shell is waiting for the other quote.
https://stackoverflow.com//questions/15773278/i-get-dquote-as-a-result-of-executing-a-program-in-linux-shell
How to set the environmental variable LD_LIBRARY_PATH in linux
I have first executed the command: export LD_LIBRARY_PATH=/usr/local/lib
You should add more details about your distribution, for example under Ubuntu the right way to do this is to add a custom .conf file to /etc/ld.so.conf.d, for example sudo gedit /etc/ld.so.conf.d/randomLibs.conf inside the file you are supposed to write the complete path to the directory that contains all the librari...
https://stackoverflow.com//questions/13428910/how-to-set-the-environmental-variable-ld-library-path-in-linux
linux - Difference between checkout and export in SVN
What is the exact difference between SVN checkout and SVN export?
svn export simply extracts all the files from a revision and does not allow revision control on it. It also does not litter each directory with .svn directories. svn checkout allows you to use version control in the directory made, e.g. your standard commands such as svn update and svn commit.
https://stackoverflow.com//questions/419467/difference-between-checkout-and-export-in-svn
c - Whole one core dedicated to single process
Is there any way in Linux to assign one CPU core to a particular given process and there should not be any other processes or interrupt handlers to be scheduled on this core?
Yes there is. In fact, there are two separate ways to do it :-) Right now, the best way to accomplish what you want is to do the following: Add the parameter isolcpus=[cpu_number] to the Linux kernel command line from the boot loader during boot. This will instruct the Linux scheduler not to run any regular tasks on ...
https://stackoverflow.com//questions/13583146/whole-one-core-dedicated-to-single-process
linux - Python subprocess.Popen "OSError: [Errno 12] Cannot allocate memory"
Note: This question was originally asked here but the bounty time expired even though an acceptable answer was not actually found. I am re-asking this question including all details provided in the original question.
As a general rule (i.e. in vanilla kernels), fork/clone failures with ENOMEM occur specifically because of either an honest to God out-of-memory condition (dup_mm, dup_task_struct, alloc_pid, mpol_dup, mm_init etc. croak), or because security_vm_enough_memory_mm failed you while enforcing the overcommit policy. Start ...
https://stackoverflow.com//questions/1367373/python-subprocess-popen-oserror-errno-12-cannot-allocate-memory
linux - Tell Composer to use Different PHP Version
I've been stuck at this for a few days. I'm using 1and1 hosting, and they have their PHP set up a bit weird.
Ubuntu 18.04 case ... this run for me. /usr/bin/php7.1 /usr/local/bin/composer update
https://stackoverflow.com//questions/32750250/tell-composer-to-use-different-php-version
linux - Identify user in a Bash script called by sudo
If I create the script /root/bin/whoami.sh containing:
$SUDO_USER doesn't work if you are using sudo su -. It also requires multiple checks - if $USER == 'root' then get $SUDO_USER. Instead of the command whoami use who am i. This runs the who command filtered for the current session. It gives you more info than you need. So, do this to get just the user: who am i | a...
https://stackoverflow.com//questions/3522341/identify-user-in-a-bash-script-called-by-sudo
terminal - How do you scroll up/down on the console of a Linux VM
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
SHIFT+Page Up and SHIFT+Page Down. If it doesn't work try this and then it should: Go the terminal program, and make sure Edit/Profile Preferences/Scrolling/Scrollback/Unlimited is checked. The exact location of this option might be somewhere different though, I see that you are using Redhat.
https://stackoverflow.com//questions/15255070/how-do-you-scroll-up-down-on-the-console-of-a-linux-vm
sql server - Error: TCP Provider: Error code 0x2746. During the Sql setup in linux through terminal
I am trying to setup the ms-sql server in my linux by following the documentation https://learn.microsoft.com/pl-pl/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-2017
[UPDATE 17.03.2020: Microsoft has released SQL Server 2019 CU3 with an Ubuntu 18.04 repository. See: https://techcommunity.microsoft.com/t5/sql-server/sql-server-2019-now-available-on-ubuntu-18-04-supported-on-sles/ba-p/1232210 . I hope this is now fully compatible without any ssl problems. Haven't tested it jet.] Rev...
https://stackoverflow.com//questions/57265913/error-tcp-provider-error-code-0x2746-during-the-sql-setup-in-linux-through-te