teleren/devto huggingface dataset:
What’s the Easiest Way to Set Up a Lamp Stack in Ubuntu?
Tags: ubuntu
Published: 2021-11-25 10:11:39

---
title: What’s the Easiest Way to Set Up a Lamp Stack in Ubuntu?
published: true
date: 2021-11-25 09:52:27 UTC
tags: Ubuntu
canonical_url: https://stackallflow.com/ubuntu/whats-the-easiest-way-to-set-up-a-lamp-stack-in-ubuntu/
---

<header>
<p><span style="font-size: 1.2em; color: initial;">lamp</span><span style="font-size: 1.2em; color: initial;">software installation</span></p>
</header>

I set up a new VPS instance of Ubuntu and am wondering what the easiest way is to get up and running with a basic LAMP stack (i.e. which packages are required, which configuration options need to be tweaked, if any, etc.).

#### Accepted Answer

```
sudo apt-get update
sudo apt-get install tasksel
sudo tasksel install lamp-server

```

It will install all the basic LAMP stack for you, prompt for MySQL root password, etc.

More specifically it will install the following packages, and their dependencies.

```
mysql-client-core-5.1 libwrap0 apache2  
libaprutil1-dbd-sqlite3 tcpd  
libapache2-mod-php5 apache2.2-common  
apache2-utils php5-common  
libaprutil1-ldap libaprutil1  
php5-mysql mysql-server-core-5.1  
libdbi-perl libplrpc-perl mysql-server  
apache2.2-bin libdbd-mysql-perl  
libhtml-template-perl  
libnet-daemon-perl libapr1  
mysql-server-5.1 libmysqlclient16  
ssl-cert apache2-mpm-prefork  
mysql-common mysql-client-5.1  

```

You might also want to take a peek at the [Ubuntu Server Guide](https://help.ubuntu.com/12.04/serverguide/lamp-overview.html).

The post [What’s the Easiest Way to Set Up a Lamp Stack in Ubuntu?](https://stackallflow.com/ubuntu/whats-the-easiest-way-to-set-up-a-lamp-stack-in-ubuntu/) appeared first on [Stack All Flow](https://stackallflow.com).
Why Crontab Scripts Are Not Working in Ubuntu?
Tags: ubuntu
Published: 2021-11-25 10:11:44

---
title: Why Crontab Scripts Are Not Working in Ubuntu?
published: true
date: 2021-11-25 09:51:35 UTC
tags: Ubuntu
canonical_url: https://stackallflow.com/ubuntu/why-crontab-scripts-are-not-working-in-ubuntu/
---

<header>
<p><span style="font-size: 1.2em; color: initial;">cron</span></p>
</header>

Often, `crontab` scripts are not executed on schedule or as expected. There are numerous reasons for that:

1. wrong crontab notation
2. permissions problem
3. environment variables

This community wiki aims to aggregate the top reasons for `crontab` scripts not being executed as expected. Write each reason in a separate answer.

Please include one reason per answer – details about why it’s not executed – and fix(es) for that one reason.

Please write only cron-specific issues, e.g. commands that execute as expected from the shell but execute erroneously by cron.

#### Accepted Answer

**Different environment**

Cron passes a minimal set of environment variables to your jobs. To see the difference, add a dummy job like this:

```
* * * * * env > /tmp/env.output
```

Wait for `/tmp/env.output` to be created, then remove the job again. Now compare the contents of `/tmp/env.output` with the output of `env` run in your regular terminal.

A common “gotcha” here is the `PATH` environment variable being different. Maybe your cron script uses the command `somecommand` found in `/opt/someApp/bin`, which you’ve added to `PATH` in `/etc/environment`? cron ignores `PATH` from that file, so runnning `somecommand` from your script will fail when run with cron, but work when run in a terminal. It’s worth noting that variables from `/etc/environment` will be passed on to cron jobs, just not the variables cron specifically sets itself, such as `PATH`.

To get around that, just set your own `PATH` variable at the top of the script. E.g.

```
#!/bin/bash
PATH=/opt/someApp/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# rest of script follows

```

Some prefer to just use absolute paths to all the commands instead. I recommend against that. Consider what happens if you want to run your script on a different system, and on that system, the command is in `/opt/someAppv2.2/bin` instead. You’d have to go through the whole script replacing `/opt/someApp/bin` with `/opt/someAppv2.2/bin` instead of just doing a small edit on the first line of the script.

You can also set the PATH variable in the crontab file, which will apply to all cron jobs. E.g.

```
PATH=/opt/someApp/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

15 1 * * * backupscript --incremental /home /root

```

The post [Why Crontab Scripts Are Not Working in Ubuntu?](https://stackallflow.com/ubuntu/why-crontab-scripts-are-not-working-in-ubuntu/) appeared first on [Stack All Flow](https://stackallflow.com).
How to Get Permissions to Edit System Configuration Files in Ubuntu?
Tags: ubuntu
Published: 2021-12-01 08:42:25

---
title: How to Get Permissions to Edit System Configuration Files in Ubuntu?
published: true
date: 2021-11-25 09:45:14 UTC
tags: Ubuntu
canonical_url: https://stackallflow.com/ubuntu/how-to-get-permissions-to-edit-system-configuration-files-in-ubuntu/
---

<header>
<p><span style="font-size: 1.2em; color: initial;">configuration</span><span style="font-size: 1.2em; color: initial;">permissions</span><span style="font-size: 1.2em; color: initial;">root</span></p>
</header>

I can’t seem to edit and save config files in the root system (eg: `/etc/dhcp/dhcpd.config`); it just says “permission denied” or the save option is blocked in the text editor.

I’m pretty sure I’m a root user, but how do I make sure? If I am a root user, how do I fix this?

#### Accepted Answer

Which text editor are you using? If you are a root user and know the password, try (in a terminal) either:

- `sudoedit /etc/dhcp/dhcpd.config` if you are using a terminal-based editor such as `nano` or are ssh’ing into a server.
- `gksudo <text editor here> /etc/dhcp/dhcpd.config` if you are using a GUI-based editor such as `gedit`

In either case, you’ll need to first provide your root password when requested.

In Ubuntu 14.04 onwards, `gksudo` is not installed by default. You will have to install the `gksu` package (either from the Software Centre or via `sudo apt-get install gksu`) to get it.

In Ubuntu 17.10, Wayland is default instead of the traditional X server, and running graphical editors as root is difficult. See [Why don’t gksu/gksudo or launching a graphical application with sudo work with Wayland?](https://askubuntu.com/q/961967/158442) for details.

In Ubuntu 18.04, `gksudo` is not available in the official repositories. Use `sudo -H <text editor>` instead, or [the `admin://` protocol](https://askubuntu.com/a/868882/158442):

```
gedit admin:///etc/dhcp/dhcpd.config

```

The post [How to Get Permissions to Edit System Configuration Files in Ubuntu?](https://stackallflow.com/ubuntu/how-to-get-permissions-to-edit-system-configuration-files-in-ubuntu/) appeared first on [Stack All Flow](https://stackallflow.com).
What’s the Simplest Way to Edit and Add Files to “/Var/WWW” in Ubuntu?
Tags: ubuntu
Published: 2021-11-25 10:11:59

---
title: What’s the Simplest Way to Edit and Add Files to “/Var/WWW” in Ubuntu?
published: true
date: 2021-11-25 09:50:35 UTC
tags: Ubuntu
canonical_url: https://stackallflow.com/ubuntu/whats-the-simplest-way-to-edit-and-add-files-to-var-www-in-ubuntu/
---

<header>
<p><span style="font-size: 1.2em; color: initial;">permissions</span><span style="font-size: 1.2em; color: initial;">webserver</span></p>
</header>

Having installed the web server is there a simple way to set a user able to use the graphic interface to copy files and directories to the local web server /var/www

I gave myself administrative privileges in Ubuntu but it still doesn’t allow copies.

#### Accepted Answer

If you make /var/www writeable by its group and add the user to the group, that user will not have to use sudo. Try this:

```
sudo adduser <username> www-data
sudo chown -R www-data:www-data /var/www
sudo chmod -R g+rwX /var/www

```

The user should then be able to edit /var/www/ files without hassle.

The first line adds the user to the www-data group, the second line clears up any files with messed up ownership, and the third makes it so that all users who are members of the www-data group can read and write all files in /var/www.

If you are logged in as `<username>` you need to log out and log back in for the group membership to take effect.

The post [What’s the Simplest Way to Edit and Add Files to “/Var/WWW” in Ubuntu?](https://stackallflow.com/ubuntu/whats-the-simplest-way-to-edit-and-add-files-to-var-www-in-ubuntu/) appeared first on [Stack All Flow](https://stackallflow.com).
How to Reset Gnome to the Defaults in Ubuntu?
Tags: ubuntu
Published: 2021-12-01 08:42:43

---
title: How to Reset Gnome to the Defaults in Ubuntu?
published: true
date: 2021-11-25 09:47:53 UTC
tags: Ubuntu
canonical_url: https://stackallflow.com/ubuntu/how-to-reset-gnome-to-the-defaults-in-ubuntu/
---

<header>
<p><span style="font-size: 1.2em; color: initial;">configuration</span><span style="font-size: 1.2em; color: initial;">gnome</span></p>
</header>

I was playing around with some settings, and now I need to reset GNOME to it’s defaults – how do I do that?

#### Accepted Answer

For Unity-related configuration resetting, [take a look here](https://askubuntu.com/questions/17610/how-do-i-reset-my-unity-configuration).

For Ubuntu 17.10 and higher, [you can reset all the settings using dconf](https://askubuntu.com/a/959976/172367).

**_This command will delete your configuration files. Once it’s run there is no going back!_**

Still with me?

**GNOME2**

Run the following in the terminal or <kbd>Alt</kbd>+<kbd>F2</kbd>:

```
rm -rf .gnome .gnome2 .gconf .gconfd .metacity

```

That will do is remove all the GNOME2 configuration settings. Log out, and log back in. You’ll be back to a stock desktop.

You can backup before playing around with your settings in the future:

```
mkdir ./.old-gnome-config && mv ./.gnome* ./.old-gnome-config && mv .gconf* ./.old-gnome-config && mv ./.metacity ./.old-gnome-config

```

**GNOME3**

If your config isn’t worth saving run the following:

```
rm -rf .gnome .gnome2 .gconf .gconfd .metacity .cache .dbus .dmrc .mission-control .thumbnails ~/.config/dconf/user ~.compiz*

```

To back up and reset GNOME3:

```
mkdir ./.old-gnome-config/ && mv ./.gnome* ./.old-gnome-config/ && mv .gconf* ./.old-gnome-config/ && mv ./.metacity ./.old-gnome-config/ && mv ./.cache ./.old-gnome-config/ && mv ./.dbus ./.old-gnome-config/ && mv ./.dmrc ./.old-gnome-config/ && mv ./.mission-control ./.old-gnome-config/ && mv ./.thumbnails ./.old-gnome-config/ && mv ~/.config/dconf/* ./.old-gnome-config/

```

The post [How to Reset Gnome to the Defaults in Ubuntu?](https://stackallflow.com/ubuntu/how-to-reset-gnome-to-the-defaults-in-ubuntu/) appeared first on [Stack All Flow](https://stackallflow.com).
The Difference Between “Gksudo Nautilus” and “Sudo Nautilus” in Ubuntu?
Tags: ubuntu
Published: 2021-12-01 08:41:46

---
title: The Difference Between “Gksudo Nautilus” and “Sudo Nautilus” in Ubuntu?
published: true
date: 2021-11-25 09:42:01 UTC
tags: Ubuntu
canonical_url: https://stackallflow.com/ubuntu/the-difference-between-gksudo-nautilus-and-sudo-nautilus-in-ubuntu/
---

<header>
<p><span style="font-size: 1.2em; color: initial;">gksudo</span><span style="font-size: 1.2em; color: initial;">root</span><span style="font-size: 1.2em; color: initial;">Security</span><span style="font-size: 1.2em; color: initial;">sudo</span></p>
</header>

I’ve been using `gksudo nautilus` and `sudo nautilus` through <kbd>Alt</kbd>+<kbd>F2</kbd>.

What’s the difference? They look very similar!

#### Accepted Answer

Taken from [here](https://help.ubuntu.com/community/RootSudo#Graphical_sudo):

> You should **never** use normal `sudo` to start graphical applications as  
> root. You should use `gksudo` (`kdesudo` on Kubuntu) to run such programs. `gksudo` sets `HOME=/root`, and copies `.Xauthority` to a `tmp` directory.  
> This prevents files in your home directory becoming owned by root.

Please note that this is primarily about _configuration files_. If you run Nautilus as `root`, even with `gksu`/`gksudo`, and you create a file or folder anywhere with it (including in your home directory), that file or folder will be owned by `root`. But if you run Nautilus (or most other graphical applications) as `root` with `sudo`, they may save their _configuration files_ in your home directory (rather than `root`‘s home directory). Those configuration files may be owned by `root` and inaccessible when you’re not running as root, which can severely mess up your settings, and may even keep some applications from working altogether.

The solution, once you have made this mistake, is to find the configuration files and delete them or [`chown`](http://manpages.ubuntu.com/manpages/precise/en/man1/chown.1.html) them back to belonging your non-`root` user. Many such files start with a `.` or are contained in a directory that starts with a `.`. Some are located inside the `.config` folder in your home directory. To see files and folders that start with a `.` in Nautilus, press <kbd>Ctrl</kbd>+<kbd>H</kbd> (this _shows hidden files_.) To see them with [`ls`](http://manpages.ubuntu.com/manpages/precise/en/man1/ls.1.html), use the `-a` (or `-A`) flag.

To find if there are files not owned by you in your home directory, you can use the following command in a terminal:

```
find $HOME -not -user $USER -exec ls -lad {} ;

```

which will list all files under the home directory not owned by the user.

The post [The Difference Between “Gksudo Nautilus” and “Sudo Nautilus” in Ubuntu?](https://stackallflow.com/ubuntu/the-difference-between-gksudo-nautilus-and-sudo-nautilus-in-ubuntu/) appeared first on [Stack All Flow](https://stackallflow.com).
Series on GitHub by iAtharva
Published: 2021-11-25 09:41:36

Hello World! 

### Why this article?
To inform you all that, soon I am going to start with series of blogs which would explain Git and GitHub from basics  till the level I have understood it. cause still learning :) I will be trying to make it as beginners friendly as possible.

### Where to read/see all posts?
The link of the all posts in order will be added to my website under blog section (click [here](https://iatharva.github.io/blog.html) to visit).
Links will also be updated in this article.
Article 1: [How to create GitHub account for beginners?](https://dev.to/iatharva/how-to-create-github-account-for-beginners-52k8)

### Who am I?
My name's Atharva who is working, studying and learning new things in tech.
To know more about me you can visit:
[github.com/iatharva](https://github.com/iatharva)
[iatharva.github.io](https://iatharva.github.io)
web designing training with A2n academy.com
Tags: webdev, beginners
Published: 2021-11-25 09:41:02

The <ahref="https://www.a2nacademy.com/course/web-design-course"> web designing course online</a> is the solution to the problem. The course will teach you all the skills and techniques required to become a professional web designer and an expert in this field.

The web designing training online also has a huge advantage over its offline counterpart because it can be completed at your own pace and time. You can learn at your own convenience without any pressure of deadlines or assignments.

<ahref="https://www.a2nacademy.com/course/web-design-course"> web designing training</a> is an essential tool for individuals who wish to create interactive, eye-catching websites.

The course will equip you with skills that can be used in a variety of job roles including web designer, graphic designer, and a web developer. It also helps an individual improve their chances of being hired by a company.

Before designing a website, you have to have a clear understanding of the design principles. Without this understanding, it would be difficult to create a website that is well-organized and attractive.

A web designing course can teach you all these principles and more in detail. You can learn basic HTML and CSS language, which will help you to create websites from scratch. This course will also teach you about graphic design such as typography and color theory, usability techniques for web pages, responsive layouts and more.
Windows Installer for Ubuntu 14.04 Lts Onwards?
Tags: ubuntu
Published: 2021-12-01 08:33:58

---
title: Windows Installer for Ubuntu 14.04 Lts Onwards?
published: true
date: 2021-11-25 09:40:53 UTC
tags: Ubuntu
canonical_url: https://stackallflow.com/ubuntu/windows-installer-for-ubuntu-14-04-lts-onwards/
---

<header>
<p><span style="font-size: 1.2em; color: initial;">wubi</span></p>
</header>

Is there any Windows installer (wubi) for Ubuntu 14.04 LTS?

When I mount the `.iso` file with Daemon Tools and run `wubi.exe`, it just asks me if I want to reboot (I think that’s useful only when the `.iso` is burned on CD), so is there no “real” installation?

#### Accepted Answer

The WUBI installer is on the [14.04 ISO](http://meta.askubuntu.com/questions/7497/wubi-discussion-again-supported-here-on-ask-ubuntu-13-04-and-later/7596#7596) and works with windows up to 7. Windows 8 and Windows ME are not supported by WUBI. The only ISO that does not have WUBI is the [13.04 version](https://lists.ubuntu.com/archives/ubuntu-devel/2013-April/036993.html) (and that is end of life already)

Take note of the accepted upvote on the 1st link from a developer of WUBI. Copied parts from META:

> … **It has shipped on the CD and is still shipped. Primary function is to  
> be a “cd autolauncher” for people who pop the cd into a Windows  
> machine, at that time it says “You need to reboot, to try ubuntu!  
> [reboot now]” or some such.**
> 
> If one copies the wubi.exe off the cd, it will launch and offer Wubi  
> based installation.
> 
> If one downloads wubi.exe off official release mirrors or  
> releases.ubuntu.com, it also works.
> 
> It works O.K. for all defined flavours i386/amd64 builds in BIOS mode.
> 
> There is no confirmation if it works with UEFI, UEFI Windows 8, UEFI  
> Windows 8 + SecureBoot. The last one believed to be the typical  
> configurations of new computers that do not come with ubuntu  
> pre-installed.
> 
> **Since it’s no longer an optimal solution for the default new installs, it has been de-emphasised on the ubuntu.com/download website.**
> 
> Officially it is still supported – precise has 3 more years of support, and wubi has not yet been removed from any isos and is present to download for all releases and is present on all released .isos. (12.10, 13.04, 13.10 and 12.04.x point releases)

* * *

Mind the operating system noted not including 14.04 because this was posted before the release of 14.04. Support for WUBI has NOT dropped; it is no longer the preferred method though since Windows 8 does not play nice but if you have Windows 7 or older (excluding Windows ME) all you need to do is copy the installer from the ISO and it will install.

The post [Windows Installer for Ubuntu 14.04 Lts Onwards?](https://stackallflow.com/ubuntu/windows-installer-for-ubuntu-14-04-lts-onwards/) appeared first on [Stack All Flow](https://stackallflow.com).
Php Smarty template - assigning complex content to variables
Published: 2021-11-25 09:40:50

In some cases Smarty doesn't allow you to assign values to variables just like that. For example in foreach loops. Then the following solutions can work.
1, Assign a simple text with variables:
```
{assign "myVar2" "myVar1 content=$myVar1"}
```
  explanation: Smarty's smart enough to replace value of variable within quotes.

2, Assign special characters or longer text:
```
{capture assign="myVar3"}mytext{$myVar1}_{$myVar2}{/capture}
```
  explanation: the capture tag allows you to add text without quotes so it's readable. Variables have to be in {}.

3, Do ternary operation and assign value:
```
{$myVar4= ($myVar1|strstr:"my sample text")?1:0}
```
  explanation: need to be aware of the brackets, but works fine. Normal brackets contain the condition.

Ternary operator concatenate variables with string (if the parentname is set, concatenate variables to a new string)

```
{$prodName = ($parentname) ? "`$parentname` - `$name`" : $name}
```
How to Enable Root Login in Ubuntu?
Tags: ubuntu
Published: 2021-11-30 05:50:49

---
title: How to Enable Root Login in Ubuntu?
published: true
date: 2021-11-25 09:37:55 UTC
tags: Ubuntu
canonical_url: https://stackallflow.com/ubuntu/how-to-enable-root-login-in-ubuntu/
---

<header>
<h1>Ubuntu – How to enable root login</h1>
</header>

rootusers

I would like to enable the root account on my Ubuntu installation.

I realize the security implications of this.

#### Accepted Answer

# Warning

While it’s possible to do, [it is not recommended](https://askubuntu.com/questions/16178/why-is-it-bad-to-run-as-root).

# Enabling

To actually enable root logins first you have to set a password for the root account and then unlock the locked root account. If you don’t set a password for the root account the `passwd` command will return

```
passwd: unlocking the password would result in a passwordless account.  

```

So, first execute in a terminal

```
sudo passwd root

```

you will be prompted for a new Unix password. Write it twice (second for confirmation).

Then execute

```
sudo passwd -u root 

```

to unlock the account. This should return

```
passwd: password expiry information changed

```

# Reverting

If you want to disable root account in Ubuntu you need to lock the root account by using the following command `sudo passwd -l root`

# Alternatives to root login

If you want to work on a root console you can also use `sudo -i`.

Only do this if you know what you are doing. More information on why to stay with sudo [here](https://help.ubuntu.com/community/RootSudo)

# Graphical version needs setting up 1st:

`pkexec gnome-terminal` will open a terminal with a root prompt.

`passwd root` will allow you to create a password for root.

**Note:** Running users-admin with elevated privileges no longer works because of a bug that is marked as “Won’t Fix” for security reasons. See [https://bugs.launchpad.net/ubuntu/+source/gnome-system-tools/+bug/685215](https://bugs.launchpad.net/ubuntu/+source/gnome-system-tools/+bug/685215) for an explanation.

`pkexec users-admin` will open the users screen: ![im1](https://i.stack.imgur.com/hcJEA.png)

# Documentation

- [https://help.ubuntu.com/community/RootSudo](https://help.ubuntu.com/community/RootSudo)

The post [How to Enable Root Login in Ubuntu?](https://stackallflow.com/ubuntu/how-to-enable-root-login-in-ubuntu/) appeared first on [Stack All Flow](https://stackallflow.com).
best christmas tree
Tags: christmastree
Published: 2021-11-25 09:01:22

A beautiful Christmas Tree that displays your style. Choose from 3 different types to create your unique holiday masterpiece. From the classic pine trees to whimsical snowflakes, there's no limit to how you can make this Christmas Tree your own!
Watch our full reviews at: https://bit.ly/2ZjgGve
👆 Related posts:
✔️ https://bit.ly/3cC4Wa2
✔️ https://bit.ly/3HOppqo
✔️ https://bit.ly/32gdbGQ
✔️ https://bit.ly/3xcjruP
✔️ https://bit.ly/30St1Hb

➡️ Our website: https://homechit.com/
➡️ Youtube: https://bit.ly/3xbodst
Read more:
https://homechit.com/best-fake-christmas-tree/
https://homechit.com/best-pre-lit-christmas-tree/
https://homechit.com/best-christmas-tree-deals/
https://homechit.com/best-artificial-trees/
https://homechit.com/best-place-to-buy-artificial-christmas-tree/
https://homechit.com/best-fake-trees/
https://homechit.com/best-faux-christmas-trees/
https://homechit.com/best-price-on-christmas-tree/
https://homechit.com/best-deals-on-artificial-christmas-trees/
https://homechit.com/best-pre-lit-artificial-christmas-trees/
Tags: #artificialchristmastree #christmastrees #artificialtrees #christmastree best christmas trees 2021, Best Christmas Tree of December