[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Linux Distributions

27K

Solutions

20K

Contributors

A Linux distribution is an operating system made as a software collection based on the Linux kernel and, often, on a package management system and are available for a variety of systems. A typical Linux distribution comprises a Linux kernel, GNU tools and libraries, additional software, documentation, a window system (the most common being the X Window System), a window manager, and a desktop environment. Most Linux systems are open-source software made available both as compiled binaries and in source code form, allowing modifications to the original software. Over three hundred distributions are in active development, including commercially backed distributions (such as Fedora, openSUSE and Ubuntu) and community-driven distributions (such as Debian, Slackware, Gentoo and Arch Linux).

Share tech news, updates, or what's on your mind.

Sign up to Post

Are there instructions somewhere for setting up VPN on Ubuntu via command line?

Anyone can provide any reference please?  Thank you!!
0
Rowby Goren Makes an Impact on Screen and Online
LVL 12
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

MY SYSTEM
Ubuntu Linux 18.04.1

QUESTION
I need to know what is the best recommended Anti-Virus and Malware protection I can install on my Linux machine.
Please include: Free, Less Expensive, and the Best (no matter what the price), so I can make my decision.
0
We have Ubuntu 18.04.1 LTS running on a virtual machine in VMWare Workstation 12.5.7 build-5813279.

The network settings appear to be correct however every time we boot it we get the grey icon with the question mark.  We can disable the network and reenable it and everything is fixed.  Can you tell me how to fix this issue as it is rather annoying?
0
When updating composer (sudo composer update), got the error below:
"- The requested PHP extension ext-memcached * is missing from your system. Install or enable PHP's memcached extension."
Tried very hard to install "PHP extension ext-memcached", but could not get anywhere.
Background: PHP 7.2.10-0ubuntu0.18.04.1 (cli) (built: Sep 13 2018 13:45:02) ( NTS ) on oracle VirtualBox v5.2.22.

Will any gurus shed some light to it?
0
Hi,

I'm new to Azure and am having issues with my test Ubuntu VM - I am unable to get outbound internet access. I have been trying for a few hours to get this to work and am now completely stuck.

I have gone through the following steps:

The VM has a private IP, which is statically assigned in Azure but acquired using DHCP on the OS.
The network security group that is attached to the network interface allows outbound internet access.
There is no security group defined on the subnet.
There are no custom route tables on the subnet.
To remove DNS from the equation, I also tried to ping an IP address (8.8.8.8).

Can anyone think of something I've missed?

Thanks,
Adrian
0
I have an NTFS hard drive from a windows 10 computer that died.  I want to access the user docs, pics, etc. to copy them onto an external hard drive to get them onto a new machine (which is going to be a mac which I think adds another layer of nuisance to the process).

But focusing just on getting to the files right now - I removed the hard drive from the computer and connected it to another pc as a 2nd hard drive.

I can browse the c drive, but because of the default NTFS permissions on the user folders, can't get in there.  I can take ownership of all the folders and files under my docs then get access.  But isn't there an easier way?

I was able to browse the files on the hard drive when I booted systemrescueCD and mounted the hard drive in that linux environment - Linux ignores ntfs permissions, right?

But then trying to copy them to another hard drive I get input/output errors on the  blank external hard drive. both from file commander and midnight commander.

Any way to access the drive in windows (which I am MUCH MORE familiar with than Linux) without having to change ownership / permissions on the old drive?  I don't want to do much changes to the old drive if I can avoid it - just get the files off.

or is there a much more windows like linux version?
0
i have removed below pid file using rm command as i got some error messages with permissions on that

rm xyz.pid

is there is a way i can restore that file

I am trying to start the web logic server and having issues which used to work earlier file

Please advise
0
Simple question; can someone tell me the average size of the install of Red hat Enterprise Linux (i.e. with no extra software installed) ?

My company is looking to gauge the amount of disk space we would need to allot to a new RHEL server (latest version) and before we take into account the extra disk size of the extra software we will install.
0
Hi ...
I was wondering if anyone knows how to change default icons for a new user in Slitaz.
By default, trash icon and Document icon get added to desktop when a new user logs in for the first time.
I am trying to change it only to Terminal.
Thank you for your Quick Prompts.
0
How do you extract log files out of linux saving a txt file and sending to support in an email.  There are two log files I need to extract out of linux they are call prod.log and httpd.log file.  what is the linux command to copy the log file out and save as txt file so I can send in an email
0
Learn Ruby Fundamentals
LVL 12
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

For some reason, my server is hitting wp-admin/admin-ajax.php every second.  Even if I close every tab in the browser related to that site it won't stop accessing that url.  I have  narrowed it down to using only one of my ipV6 ip's.  I have tried the code below in functions.php which I put in the child theme's functions.php, did a restart but still it keeps accessing.  I installed Perfmatters and that hasn't stopped it and I installed the Heartbeat Monitor plugin and that hasn't stopped it.

This is taking down my server with that much activity and I can't seem to find a connection since I didn't know this was going on because I hadn't looked at the access_log for several days.  I have resorted to a cron entry to restart apache 2.4 every 5 minutes.

This is the code I tried in the functions.php

*/
add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat() {
 wp_deregister_script('heartbeat');
}
/**

Open in new window



I am on Linux 2 with Wordpress 4.9.8.

Please help me get this stopped.

Thanks,
0
I am encountering an error when I try to install memcached on a PHP 7 - Linux AWS system.  This is the command I am using that generates the error.
yum install memcached php-pecl-memcache

Open in new window


This is 1 of 2 errors:
1.
Finished Dependency Resolution
Error: Package: php-pecl-memcache-3.0.8-4.amzn2.x86_64 (amzn2-core)
           Requires: php(api) = 20100412-64

Open in new window


2.  
Error: Package: php-pecl-memcache-3.0.8-4.amzn2.x86_64 (amzn2-core)
           Requires: php(zend-abi) = 20100525-64

Open in new window


Please help me with how to finish installing memcached.

Thanks,
0
What is the location of  the binary and library postgresql directories installed on docker linux suse 12 sp2 ?
We have this postgres DB installation working ok.
I have access to the database using pgadmin and dbeaver.
But we don't know who did this installation and I need to know the location of the binary and library postgresql directories in order to run pg_ctl and psql.
0
For Clam's dependent packages required as indicated by
  https://www.opencsw.org/packages/CSWclamav/  ,

I can't get 2 packages for Solaris 10 (Update 9) x86 :

1. common : it can only locate the i386 package for SunOS 5.8 in url below
  http://rsync.opencsw.org/opencsw/testing/i386/5.10/

Likewise for
2. libbz2_1_0 : can only locate for SunOS 5.9


Anyone has access to Oracle subscription, can assist to download the above
packages & attach them here?


For the 10 dependent packages, what's given are for i386, so if can help
provide for Solaris 10 x86, appreciated:
https://www.opencsw.org/packages/CSWclamav/
0
https://www.manageengine.com/products/eventlog/system_requirement.html

We're trying to quickly set up ManageEngine Eventlog analyzer/SIEM for our
Solaris 10 x86   and  RHEL 6  servers : all are 64bit OS.

Somehow I can't locate anything for Solaris 10 x86 : need the agents installer.
Still looking for RHEL6.  I'm not too good with navigating.

Anyone can help locate & give the exact links?
0
Our RHEL 6  DB server does not have Internet access, thus we can't do 'yum'.

We would like to temporarily install ftp server (guess it's called vsftpd) :
how can we go about doing this?  Give step by step instruction including
where to get vsftpd rpm package (& its dependent packages if any).

Also provide the exact commands (guess it's  'rpm -ivh ./folder_of_RPMs' )

We can download to a laptop & use laptop to sftp over the RPMs.
0
Actually the file descriptor table is not a real table. It's just an array of pointers to the "open file table" (struct file). But let's say we will see it as a table. What are the columns? For example:

FD   | Pointer to "open file table"
----------------------------------
...  | ...

In short, that's the question. I see a lot of different figures on the internet, but they are all different. For example, see:

http://faculty.winthrop.edu/dannellys/csci325/10_shared.htm
There they have a column "fd flags" (read/write), but I would think that this column is part of the "open file table" and not part of the "file descriptor table". See for example: http://man7.org/linux/man-pages/man2/open.2.html


       A call to open() creates a new open file description, an entry in the
       system-wide table of open files.  The open file description records
       the file offset and the file status flags (see below).  A file
       descriptor is a reference to an open file description; this reference
       is unaffected if pathname is subsequently removed or modified to
       refer to a different file.  For further details on open file
       descriptions, see NOTES.

       The argument flags must include one of the following access modes:
       O_RDONLY, O_WRONLY, or O_RDWR.  These request opening the file read-
       only, write-only, or read/write, respectively.
0
Let's start with a useless example of input redirection:

less 1< /test.txt

Open in new window


The result is:

Missing filename ("less --help" for help)

This I understand, because:

LESS-PROCESS:
FD 0 <- terminal file (keyboard)
FD 1 <- /test.txt
FD 2 -> terminal file (monitor)

FD 0 needs to get some content from a file, but there is no file in this case. There is /test.txt but it points to the wrong fd. Now let's take a look at a useless example of output redirection:

less 0> /test.txt

Open in new window


LESS-PROCESS:
FD 0 -> /test.txt
FD 1 -> terminal file (monitor)
FD 2 -> terminal file (monitor)

The program doesn't give file descriptor 0 some output, so "nothing" will be written to /test.txt. That why you will always end up with an empty /test.txt file. File descriptor 0 opens /test.txt for writing and not for reading. So the less-process doesn't get any file to read from. Then why the result is not:

Missing filename ("less --help" for help)

Instead, less is acting as it got an empty file as input. The file /test.txt is empty in the end, but this is about output redirection and not about input redirection, so there is no input. That's the reason why I would expect "Missing filename". Why this is not the case?
0
See: https://stackoverflow.com/questions/6170598/can-anyone-explain-to-me-what-the-purpose-of-dev-tty


You can start with the POSIX spec. From there, read about the "controlling terminal" of a process.

But just for example... /dev/tty is how a command like "ssh" can read your password even if its standard input comes from somewhere else:

tar cf - . | ssh dest 'tar xf -'

Open in new window


If ssh decides to prompt you for a password, it will read it from /dev/tty instead of stdin.

Conceptually, /dev/tty is "the keyboard and text terminal". More or less.

Let's say my "terminal-file" of the current session is /dev/pts/1. In such a case, then what's the difference between "/dev/pts/1" and "/dev/tty"? And if they are basically the same, then why  "/dev/tty" is used instead of "/dev/pts/1"?

And:

/dev/tty is how a command like "ssh" can read your password even if its standard input comes from somewhere else

Let's say the standard input comes from somewhere else, so let's say we have:

FD 0 <- file
FD 1 -> /dev/pts/1
FD 2 -> /dev/pts/1

How I see it: the fact that the standard input comes from somewhere else doesn't mean that /dev/pts/1 can not be read? The password comes from the keyboard and /dev/pts/1 represents i.a. the keyboard, right? So I still don't see what exactly the purpose is of /dev/tty?

@noci: I know you know the answer, but I don't understand your explanation so I've made this post so maybe other people can explain it to me in a way that I understand it.
0
Become a Certified Penetration Testing Engineer
LVL 12
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

I'm reading about "redirection of input" on the internet. I understand what's behind it. For example:

command < file.ext

Open in new window


This is equivalent to:

command 0< file.ext

Open in new window


In general, if you have:

command n< file.ext

Open in new window


then the contents of file.ext go to file descriptor "n" as input. I've checked different websites explaining "input redirection". However, the problem is that I didn't see any good example. I'll discuss some examples I saw:

cat < file.txt

Open in new window


Then I'm thinking, "cat file.txt" does the same, so why do we need it? Another example:

sort < file_list.txt > sorted_file_list.txt

Open in new window


Then I'm thinking, "sort file_list.txt > sorted_file_list.txt" does the same, so why do we need it? Another example:

more < /etc/passwd

Open in new window


Then I'm thinking, "more /etc/passwd" does the same, so why do we need it? That's why these are not really good examples in my opinion. What is a good example to explain the purpose of input redirection in a terminal-window?

Probably internally something like "cat file.txt" is being treated as "cat 0< file.txt" (input redirection), but in a terminal-window ... when it really does make sense to use an "input redirection" in a terminal-window? Does someone have a good example?
0
First I create a regular file with some contents (manual page of find command):

man find > test.txt

Open in new window


Then I use the less command to display some of these contents:

less test.txt

Open in new window


Now I press CTRL-Z to suspend the process. The process is still open, so now I can execute this command:

lsof | grep 'less'

Open in new window


By doing this, I get an idea which files are open with respect to the less-process. My result:

COMMAND  PID    USER  FD   TYPE  DEVICE  SIZE/OFF  NODE       NAME
less     24565  root  cwd  DIR   0,38    4096      21473055   /
less     24565  root  rtd  DIR   0,38    4096      21473055   /
less     24565  root  txt  REG   0,38    149944    22143102   /usr/bin/less
less     24565  root  mem  REG   9,1               22143102   /usr/bin/less (path dev=0,38)
less     24565  root  mem  REG   9,1               22135172   /usr/lib/locale/locale-archive-rpm (path dev=0,38)
less     24565  root  mem  REG   9,1               21741879   /lib64/libc-2.12.so (path dev=0,38)
less     24565  root  mem  REG   9,1               22265955   /usr/local/lib/libpcre.so.0.0.1 (path dev=0,38)
less     24565  root  mem  REG   9,1               21741743   /lib64/libtinfo.so.5.7 (path dev=0,38)
less     24565  root  mem  REG   9,1               21741946   /lib64/ld-2.12.so (path dev=0,38)
less     24565  root  0u   CHR   136,1   0t0       4          /dev/pts/1
less     24565  root  1u   CHR   136,1   0t0       4          /dev/pts/1
less     

Open in new window

0
Let's say I type the following "in a terminal":

echo 'bla'

Open in new window


In my case, the shell is bash, so I assume the shell/bash-process receives "echo 'bla'" as standard input? Then it sees "echo", so a child process will be started. So then we will have at least:

ECHO PROCESS:
fd 0 (standard input)   <- terminal-file (keyboard)
fd 1 (standard output)  -> terminal-file (monitor)
fd 2 (standard error)   -> terminal-file (monitor)

Open in new window


I thought that for this process, only "bla" is the standard input. And then the output is also "bla", so I'll see "bla" on my monitor.

I was just a bit playing with "input redirections" and I noticed that the following does not work:

echo < bla-file.txt

Open in new window


After some Google searches, I found out that "echo" does not read from stdin. However, it prints all of its arguments. So it's working differently than normal. So how I have to see/change this:

ECHO PROCESS:
fd 0 (standard input)   <- terminal-file (keyboard)
fd 1 (standard output)  -> terminal-file (monitor)
fd 2 (standard error)   -> terminal-file (monitor)

Open in new window


I thought every process by default has fd's 0,1,2? But if fd 0 would be there something like this:

fd 0 (standard input)   <- nothing

Open in new window


Then it should be still possible to redirect (input) to something. So this means I can not see it like that. Does this mean that the echo process doesn't have a fd 0 at all? Or I must not see "echo" as a process with a fd table et cetera?

But the echo command displays something on my monitor, so at least this should be there:

fd 1 (standard output)  -> terminal-file (monitor)

Open in new window

1
See: https://www.kernel.org/doc/Documentation/filesystems/vfs.txt

Dentries live in RAM and are never saved to disc:

A directory is also a file (special file). The contents of a directory consists of:

.           inode-number-current-directory
..          inode-number-parent-directory
filename_1  inode-number-A   
filename_2  inode-number-B
et cetera...

Open in new window


Usually this data is stored in data block(s). I say "usually" because some systems may store this in the directory's inode (< 60 bytes). But usually the data is stored in data block(s). If you make an empty directory, then the contents are:

.           inode-number-current-directory
..          inode-number-parent-directory

Open in new window


Usually you will see something like this:

Blocks: 8

Open in new window


8*512=4096 bytes. So 4096 bytes in the form of data blocks are allocated on disk. A dentry is just a directory entry, so:

filename_1  inode-number-A

Open in new window


So dentries are stored on disk. Then how I have to see this sentence?

Dentries live in RAM and are never saved to disc:

If they would only live in RAM, then you will lose all your dentries if the computer restarts? And why they are not stored on disc/disk? A directory usually just shows 8 blocks, this means that it is stored on disk.

Do I make a mistake here or what's behind it?
0
dup2(int oldfd, int newfd);

Open in new window


This is an equivalent of:

close(int newfd);
dup(int oldfd);

Open in new window


By closing "newfd" first, it becomes the lowest-numbered unused file descriptor (normally). Because of that the oldfd is copied to newfd (dup system call). So far, everything is clear.

Now see: http://codewiki.wikidot.com/c:system-calls:dup2


dup2 is a system call similar to dup in that it duplicates one file descriptor, making them aliases, and then deleting the old file descriptor.

Actually I don't think the old file descriptor will be deleted?

See: http://man7.org/linux/man-pages/man2/dup.2.html

After a successful return, the old and new file descriptors may be used interchangeably.

If the old file descriptor will be deleted, then they would not say something like that. Is wikidot.com just wrong about this?
0
For this question, let's forget about v-nodes/vnodes. So let's say the contents of a file are located in data block(s) on a real physical disc.

See for example: https://www.usna.edu/Users/cs/aviv/classes/ic221/s16/lec/21/lec.html#orgheadline4

2.3 V-node and I-node Tables

There they explain the inode-table. Actually the inode-table just leads you to the contents of a file. But I think they forgot to mention something important. Let's say I'm requesting a regular file in a filesystem. In such a case, for what I need the inode-table? I just see it like this:

dentry (possibly more than 1) -> inode -> data block(s)

The inode contains the pointers to the data block(s). So why we need an inode-table? Or is this inode from above actually just an entry in the inode-table? If that's true, then it's weird because the inode-table is stored in memory, so when restarting the computer all the inodes are gone. Furthermore, probably the inode-table only contains information about open files.

Or are the inodes of open files just cached in memory (in the inode-table) to speed things up? Then the purpose of the inode-table is i.a. caching?

Anyway I'm surprised that they don't say anything about this. I think understanding the inode-table starts with the question why there is an inode-table.
0

Linux Distributions

27K

Solutions

20K

Contributors

A Linux distribution is an operating system made as a software collection based on the Linux kernel and, often, on a package management system and are available for a variety of systems. A typical Linux distribution comprises a Linux kernel, GNU tools and libraries, additional software, documentation, a window system (the most common being the X Window System), a window manager, and a desktop environment. Most Linux systems are open-source software made available both as compiled binaries and in source code form, allowing modifications to the original software. Over three hundred distributions are in active development, including commercially backed distributions (such as Fedora, openSUSE and Ubuntu) and community-driven distributions (such as Debian, Slackware, Gentoo and Arch Linux).