How To Install Atom Text Editor on CentOS 7

Atom is an open source cross-platform code editor developed by GitHub. It has a built-in package manager, embedded Git control, smart autocompletion, syntax highlighting and multiple panes.

Under the hood Atom is a desktop application built on Electron using HTML, JavaScript, CSS, and Node.js.

In this tutorial, we will install Atom Text Editor on CentOS from their official repositories.

Prerequisites

The user you are logged in as must have sudo privileges to be able to install packages.

Installing Atom on CentOS

Follow the steps below to install Atom on CentOS 7:

  1. Start by importing the Atom repository’s GPG key:

    sudo rpm –import https://packagecloud.io/AtomEditor/atom/gpgkey

  2. Create the following repo file to enable the Atom repository:

    sudo nano /etc/yum.repos.d/atom.repo

    Paste the following content into the file:

    /etc/yum.repos.d/vscode.repo

    [Atom]
    name=Atom Editor
    baseurl=https://packagecloud.io/AtomEditor/atom/el/7/$basearch
    enabled=1
    gpgcheck=0
    repo_gpgcheck=1
    gpgkey=https://packagecloud.io/AtomEditor/atom/gpgkey

    Save and close the file.

  3. Once the repository is enabled, install the latest version of Atom with:

    Yum will prompt you to import the repository GPG key. Type y and hit Enter.

Starting Atom

Now that Atom is installed on your CentOS system you can launch it either from the command line by typing code or by clicking on the Atom icon (Applications -> Programming -> Atom).

When you start the Atom editor for the first time, a window like the following should appear:

You can now start installing themes and extensions and configuring Atom according to your preferences.

Upgrading Atom

To upgrade your Atom installation when new releases are published, you can use the yum package manager normal upgrade procedure:

Conclusion

You have successfully installed Atom on your CentOS 7 machine. To learn more about how to use Atom, from beginner basics to advanced techniques, visit their official documentation page.

If you have any question, please leave a comment below.

Source

Canonical shares the Top 10 Linux Snaps of 2018 — Spotify, Slack, Plex, VLC, and more!

As 2018 comes to a close, I find myself doing much reflecting. Linux consumes much of my thinking, and sadly, this was not the year that it overtakes Windows on the desktop. You know what, though? Windows 10 was an absolute disaster this year, while the Linux-based Chrome OS has slowly become more and more mature. Other desktop Linux distributions, such as Ubuntu, Mint and Fedora, continue to get better, and Android remains the undisputed king of mobile. As we all know, Linux powers many servers around the globe too. So yeah, maybe it isn’t the year of the Linux desktop, but the open source kernel still had a superb 2018 — I raise my glass to it.

One of the most refreshing aspects of Linux in 2018 was the popularity of Snaps. Canonical revealed that the containerized packages have been a smashing success. Today, the Ubuntu-maker highlights what it feels are the top 10 Snaps of 2018. No, it is not based on popularity or voting, but seemingly, just Canonical’s opinion.

ALSO READ: Lubuntu kicks 32-bit Linux users to the curb

“With 2018 drawing to a close, and many of us spending with family during the holiday season, I thought we’d take a look back over some of our favourite Linux applications in the Snap Store. Some have been in the store for over a year, and a few landed only recently, but they’re all great,” says Alan Pope, Canonical.

ALSO READ: Ubuntu Linux 18.04 LTS comes to Dell Precision 5530 and 3530 mobile workstations

Pope further says, “Whether you’re a professional app developer, bedroom coder or enthusiastic Linux user, there’s something for everyone. Beyond these 10, there’s thousands more quality apps in the Snap Store, so have a browse, and find something new to install today.”

Canonical shares the Top 10 Snaps below.

  1. Spotify
  2. Slack
  3. VLC
  4. Nextcloud
  5. Android Studio
  6. Discord
  7. Plex Media Server
  8. Xonotic
  9. Notepad++
  10. Shotcut

While all the Snaps listed are excellent, the top three are undeniably some of the best. Look, if you want to attract people to Linux, that trio — Spotify, Slack, and VLC — will do a great job. Discord is absolutely indispensable for online gamers, who should also love playing Xonotix. To the glee of many media creators, Shotcut solves one of Linux’s biggest deficiencies — video editing.

ALSO READ: Linux on DeX Beta can turn your Samsung Galaxy smartphone or tablet into an Ubuntu desktop

My only real issue with the list is the inclusion of Notepad++. Don’t get me wrong, that is one off my favorite programs for Windows, but when it comes to Linux, I try to be a purist — I don’t let WINE on my system. Yes, the Notepad++ Snap is the Windows version hacked to work on Linux. I’ll pass, but surely some folks will be happy to have it.

Do you agree with Canonical’s list? Do you feel there is something more worthy? Please tell me in the comments below.

Photo credit: Alberto Garcia Guillen / Shutterstock

Source

CentOS Install OpenJDK – Linux Hint

When it’s necessary to build your apps or do some programming on Java, it’s always important to have all the necessary tools ready, for example, the compiler (also known as JDK – Java Development Kit) and the runtime (also known as JRE – Java Runtime Environment). Note that by default, JDK comes up with JRE, so you don’t have to manually install JRE again.

Of course, Java programs require a special environment to work on. When you compile a Java program, it generates a “jar” package that contains a universal binary form of the app. When you wish to run it, it’s the task of the JRE to read the universal binary and run it smoothly on the current system.

Linux is my favorite platform for programming, especially Java. You can work with both the Oracle Java and the OpenJDK. For Linux, I prefer the OpenJDK one as it’s more convenient on the Linux platform and almost all the major Linux distros integrate with OpenJDK easier than the Oracle counterpart.

CentOS is the open-source and community edition of the well-known and respected RHEL (Red Hat Enterprise Linux). I just got my CentOS machine ready, now I need to set OpenJDK.

Let’s go and enjoy OpenJDK!

There’re 2 separate ways of setting OpenJDK on CentOS – from the default CentOS repository (OpenJDK 8) and manually downloading and setting the OpenJDK (OpenJDK 11). Don’t forget to check out the latest features of Java 11!

Installing from CentOS repo

Fire up a terminal and make sure that everything is up-to-date –

Now, run the following command –

yum install java-1.8.0-openjdk

Installing OpenJDK manually

Note that this is not the recommended way of enjoying OpenJDK. Use the previous method unless you REALLY need the latest OpenJDK.

Using this method, you can also

Download the latest OpenJDK

Extract the downloaded OpenJDK –

tar -xfvz openjdk-11.0.1_linux-x64_bin.tar.gz –directory /usr/lib/jvm

Don’t forget to verify the extraction –

/usr/lib/jvm/jdk-11.0.1/bin/java -version

It’s time to make the switch to the newer JDK.

sudo sh -c ‘for bin in /usr/lib/jvm/jdk-11.0.1/bin/*; do update-alternatives
–install /usr/bin/$(basename $bin) $(basename $bin) $bin 100; done’

sudo sh -c ‘for bin in /usr/lib/jvm/jdk-11.0.1/bin/*; do update-alternatives
–set $(basename $bin) $bin; done’

Now, we will grab “update-alternatives” and tell the system to change to the newly set OpenJDK –

sudo update-alternatives –config java

Then, select the OpenJDK number that represents the OpenJDK 11 –

Voila! OpenJDK is now present in the system!

Don’t forget to check out the result of the change –

For Java programming, what’s better than a well-packed IDE? Check out Eclipse – one of the finest IDEs for Java programmers!

Source

The latest update on Black Mesa shows some impressive improvements coming to this Half-Life recreation

Black Mesa, the Half-Life fan-made recreation continues progressing towards finally releasing the delayed Xen levels.

The latest update, posted late last month shows off some rather impressive new stuff coming to the game. Using the system they developed for their Dynamic Lights, they’ve now included Screenspace Fog. It’s light on resources and does look rather good:

They’ve also improved the AI for the “Alien Grunts” to make them much more unpredictable and challenging. They will “leap onto different platforms, find a way to outflank you, get in your face, and unleash a devastating secondary “hornet hurricane” attack”—scary!

They also improved the Alien Controller NPC, turning them essentially into “a kind of overlord or mini-boss”. The Vortigaunt NPC was improved as well, flashlight shadows are back, Soft Particles are now working and a few other bits.

Lastly, they note about they progress specifically on the Xen levels and it sounds like progress is really good. Sounds like quite a bit of work still ahead though but it does sound exciting.

You can find Black Mesa on Steam. For Linux gamers, you will likely want to opt into the public beta.

Source

How to install Apache JMeter in Ubuntu – Linux Hint

After developing a new website, it is very important to perform some tests to find out the limitation of the site, and take necessary actions to remove the limitations for making the site more appropriate for the visitors before publishing. One of the important tests for any website is a load test. How many requests the website can handle at a time or how the website performs when a large number of requests appear on the site can find out by load test.

Apache JMeter is the best tool developed by Stefano Mazzocchi of Apache Software Foundation to perform this type of test and check out the performance of any website. It is used to create a large amount of virtual concurrent traffics to the website for doing the load test. It is open-source software. So anyone can download, install and customize this software to do the test. It is mainly designed for testing web application, but now it is also used for database testing, stress testing, distributed testing, and functional testing. How you can install and run this software is shown in this tutorial.

JMeter is a developed by Java. So you require to install the latest version of JRE or JDK to run JMeter. If you have installed Java before then run the following command to check the version of the installed Java.

The following output will appear if Java 9 is installed on the system.

If you didn’t install Java before then you can follow the steps from the following tutorial link to install Java before starting the next step.

https://linuxhint.com/install-java-9-on-ubuntu/

Go to the following URL location to download the latest version of JMeter. You can download the binary or source file of this tool from this location. Click on ‘Apache-JMeter-5.0.zip’ link to download the binary zip file of JMeter.

http://jmeter.apache.org/download_jmeter.cgi

Click on Save File radio button and OK button to start the download.

By default, the file will be downloaded in the Downloads folder. Open the folder, right click on the zip file and click on Extract Here from the pop-up menu.

Run JMeter

Press Alt+Ctrl+T to open the terminal and type the following command to go the location from where you can run JMeter.

$ cd Downloads/apache-jmeter-5.0/bin/

Run the following command to run JMeter and open the JMeter dialog box.

The following dialog box will appear after the successful installation of JMeter.

The following dialog box will appear after the successful installation of JMeter.

Simple Test using JMeter

It is discussed earlier that JMeter can be used for various types of testing. How a simple load test can be done using JMeter is shown in this part of the tutorial. Test name is set to Test Plan by default. If you want you can change the default value. Here, Name is set to Test Plan1 and test1 is set as a comment which is optional. Next, you have to set the variables that you want to use in your test. Here, the site is set as the variable name and tutorials4uhelp.com is set as value. This test will do the load test based on the next configuration of the site tutorial4uhelp.com.

Right-click on Test Plan1 from the left navigation. Click on Add, next Thread (Users) and next Thread Group. It is used to set action, properties, and schedule of Thread Group before starting the test.

In Thread Group, Five types of actions can be taken when any sampler error occurs. These are,

  • Continue
  • Start Next Thread Loop
  • Stop Thread
  • Stop Test
  • Stop Test Now

You can select any of the above actions for your test. Here, the default option is used. Next part of Thread Group is to set Thread Properties. The properties are,

  • Number of Threads (users)
    This property is used to assign the number of virtual visitors that you want for the testing. 15 is set here.
  • Ramp-Up Period (in seconds)
    This property is used to assign the time between two threads. 5 seconds is set here.
  • Loop Count
    This property is used to assign the number of times the thread will run. You can run the thread for unlimited times by selecting Forever checkbox. 1 is set here to run the thread for just one time.

There are other two properties which are “Delay Thread creation until needed” and “Scheduler”. These properties are remained unchecked here. Scheduler Configuration part is used to set the execution time of the test and it will be used in the test if you checked the Scheduler.

Next, you have to set the Sampler type to do the test. Here, HTTP Request is set as Sampler, to hit the server for the resources.

In HTTP Request part, you have to set Web Server, HTTP Request type for the test. You can use HTTP or https as protocol based on your server. By default, HTTP is used. You have to set domain name or IP address of your server in Server Name or IP field. Here, ‘tutorials4uhelp.com’ domain is used as Server Name. Other values remain as the default value.

Next, you have to set Listener type. It is used to view the test results in various format. Here, ‘View Result in Table’ is selected.

Now, you can click on the start button to start the test based on the assigned configurations. You have to wait for some time to complete the thread in this step.

The following screen will appear after completing the test.

Conclusion

JMeter is a popular testing tool now but this software has some limitations. It consumes more memory while doing the test. It is not good for desktop application and it can’t render HTML and JavaScript like the browser. If you are preparing to publish your website then it is very important to check the performance of your site. You can use JMeter for checking the performance of the site by doing different types of test on it. It will help you to detect the problems of your site and take proper actions to solve it.

Source

Looks like the ‘Linux Steam Integration’ project is being continued with Intel’s Clear Linux

Linux Steam Integration, the project originally made while developer Ikey Doherty was working on the Solus Linux distribution now seems to be continuing on under Intel with their Clear Linux distribution.

As a reminder on what it is, in their words: “Linux Steam Integration is a helper system to make the Steam Client and Steam games run better on Linux. In a nutshell, LSI automatically applies various workarounds to get games working, and fixes long standing bugs in both games and the client.”

The majority of the work done on it is by Doherty, who left Solus with a message sent to Phoronix in November. The LSI project didn’t really see much activity for many months, however this changed last month when a new repository popped up under Intel’s Clear Linux account. I’m not too up to date on what Doherty is doing now, but it seems he’s doing stuff for Intel again (he originally left Intel to work on Solus) with the LSI project now under the Intel banner.

It’s going to be interesting to see what they plan to do with it now. Whatever helps make Linux gaming better, I’m all for it. Find the new repository on GitHub.

Hat tip to Jacob.

Source

How to Run a Different OS Without Buying a New Computer

You don’t have to stick with Windows.Photo: Alex Cranz (Gizmodo)

Maybe you’ve grown tired of your current laptop or desktop operating system and you just want to try something different. Or maybe you need to use multiple OSes for work. Either way, the need for a new operating system doesn’t mean you need a whole new computer. There are numerous ways to run other operating systems without going out and buying a new machine. We’ve gathered your options, with the pros and cons for each, below.

While it will be fairly easy to get Linux running on a Windows machine or vice versa you will find it more difficult to get macOS running on a non-Apple computer. You can run Windows and Linux on a Mac, alongside macOS, but you can’t run macOS on a computer built for Windows or Linux—at least not without investing a lot of time and effort.

Creating a Hackintosh (putting macOS on a non-Mac machine) isn’t supported by Apple (Apple would much rather you just bought a Mac). So you’re relying on third-party developers for your digital copy of macOS, and it might be illegal in your country as well. If you’ve confirmed its legal and are still interested in the process, check out this guide.

It’s also worth noting that you shouldn’t attempt any of these procedures without first making sure that all your important files and apps are comprehensively backed up—but you always have backups in place don’t you?

Dual-boot systems

This is the classic method for running two operating systems alongside each other: You essentially split your hard drive in two (a process called partitioning), and then treat drives for each OS. One drive runs one operating system, and one drive runs the other, and you choose which one you want every time you start up the computer.

Boot Camp is the macOS tool for creating dual-boot systems.Image: Apple

You can add Linux to a Windows computer, or Linux or Windows to a macOS computer—Windows needs to be purchased from Microsoft here, if you want to stay on the right side of the law. For a long time actually putting the new OS on your computer was difficult and risky, but the good news is your current operating system should have everything you need to do the job now.

In macOS, the tool you need is called Boot Camp and you can launch it from the Utilities folder inside Applications. Boot Camp takes care of the partitioning process and readying everything for Windows (or Linux), and Apple has a full guide here.

Disk Management can help you organize partitions on Windows.

If you’re running Windows and adding Linux in a dual-boot setup, the Linux installer should include tools for partitioning your main hard drive—just make sure you choose to install Linux alongside Windows. You’ll also need to create a Linux installer on a CD, DVD, or USB drive first, then boot from that: There’s an official guide for doing this with Ubuntu here, for example.

If you need another tool, search for the Disk Management utility from the Windows Start menu: Here you can view, edit, and manage disk partitions. One of the disadvantages of this method is that the process is more complicated to reverse if you change your mind.

Alternatively, you can skip the partition and install a second hard drive inside your machine—provided you’re running a desktop computer and have the space. The process isn’t particularly difficult—YouTube is packed with tutorials—but it is more of a serious undertaking than just splitting your current hard drive into two with a few mouse clicks. You have to actually crack open your computer and install the additional drive, as well as much around in the BIOS for your motherboard to confirm the drive is installed correctly to function as a boot drive.

But if that’s still too daunting don’t worry. There’s another way to get operating systems on your computer without partitioning drives (and running the risk of losing data) or installing entirely new drives.

Pros: Best performance. Everything runs natively with few software hiccups.

Cons: Can be difficult to set up if you’re inexperienced. Can potentially destroy data on a current machine so backing everything up before attempting is highly recommended.

Virtual machines

The virtual machine route is the simplest route for installing a new OS. In this scenario you’re running one OS inside another one—it can be set up in minutes, no disk management is required, and the second OS can be removed very easily… but you do need a computer with enough power to handle running two operating systems at once, which means we wouldn’t recommend this route for older computers or low-powered ones.

The exact specs you’re going to need really depend on the operating systems you’re dealing with, but for something like running Windows on top of macOS we’d recommend having at least 8GB of RAM installed. You can always test these tools out and see if the performance is acceptable.

Once you’ve settled on using a virtual machine the next challenge is choosing which virtual machine software you’ll install.

Parallels makes running Windows on macOS straightforward.

VirtualBox is a good choice here—it’s open source and free to use, for a start, and will do the job of getting Linux added to Windows or Linux or Windows added to macOS. That said, it does lack some of the polish and the advanced features you get with the commercial, paid-for software, so it’s worth thinking about the alternatives.

One of the best alternatives for macOS is Parallels (yours from $80): Assuming you have the specs to run it comfortably, it makes adding Linux or Windows to a Mac very easy, and will even point you towards the right downloads (you’ll need to pay for Windows eventually, but you can test it out for free). Switching OSes can be done with a click, and you can even run individual Linux or Windows apps inside the macOS environment.

Another option is VMware Fusion ($80 and up), which offers more advanced tools suitable for developers, IT administrators, and power users. Again, it makes adding Linux or Windows to macOS straightforward, and the software will guide you step-by-step through the process. There’s very little to choose between this and Parallels, from the starting price to the feature set, and Fusion can also run single Windows applications as if they’re running on macOS if needed.

VMware Workstation Player can install Linux or an older version of Windows on Windows.

For Windows users wanting something other than VirtualBox, there’s VMware Workstation Player, which is free for personal use (a paid-for Pro edition is also available). As with the macOS Fusion software, it’s powerful yet simple to use, and will guide you step-by-step through the process of adding a virtual machine to Windows whether you want to run an older Windows version (which you need to purchase a license for) or a Linux distro (which you don’t).

As we’ve said, the big advantage here is ease of use: You don’t need to create bootable USB drives or split disks into partitions, and all these programs make setting up a virtual machine a breeze. Even the paid-for tools we’ve mentioned come with free trials, so you can give them a go and see if they work (and work fast enough) for you.

Pros: Best for beginners. Unlikely to harm any data currently on your PC. Pretty easy to set up.

Cons: Virtualization software can be expensive. Requires a powerful machine for the best performance. Not recommended for lower-end computers.

Live installations

When it comes to adding Linux to a Windows or macOS machine, you’ve got one final option: A live installation. You essentially run Linux from a USB drive or a CD or a DVD, without touching your main hard drive or operating system. It’s really easy to set up, and you don’t have to fiddle with your current OS, but it does limit the performance and features of Linux (because it’s not being run from your main hard drive).

This is a good option to go for if you just want to try an operating system out, or are only going to be using it briefly. Ubuntu has provided an official guide to creating a bootable USB stick here, which is easy to follow, but if you prefer a different flavor of Linux then you should be able to find a similar guide for whatever distro you want to try out.

Ubuntu is one OS you can run straight from a USB stick.

Linux Mint is another lightweight distro you can run from USB or disc: You can find the instructions for finding bootable media for this OS here. Even if you’ve never used Linux before, you shouldn’t have any trouble putting together a bootable memory stick, CD, or DVD, and then it’s just a question of launching the operating system.

To do this, you need to restart your computer and opt to boot from the Linux device rather than your main hard drive. On a Mac, just hold down the Option key after hearing the boot sound; on Windows machines, a key like F12 or Delete is usually used (check for instructions as the computer starts up, or check the instructions that came with it).

You’ll be able to choose the Linux USB drive or disc you’ve created, at which point the operating system starts. Considering most Linux distros come with a smattering of basic apps, you should have everything you need to get going—you can happily run the OS without touching anything on your main system.

Choosing boot options in Linux Mint.

It’s quick and it’s simple to do, so what are the disadvantages? As we’ve mentioned, it’s usually slower (which is why you want to choose a Linux distro that’s as lightweight as possible), and any changes you make to the system aren’t usually saved—you just start again from scratch next time you boot up. We’ve written more about the whole process here.

This is a good option for just testing out Linux, or getting online with a fast, basic, stripped-down OS. If you really want to use Linux seriously to install applications and edit files, you’re better off going with one of the other options mentioned above.

Pros: Super easy. Quick to set up. Keeps your primary data safe. Free apart from the cost of a USB drive.

Cons: You lose every change made to the OS on a restart. Not ideal for repeat use. Running the OS via a USB drive means it can only be as fast as the USB drive itself, which means it will be slower than running directly for your hard drive or SSD.

Source

Install Yarn on Ubuntu and Debian Linux [Official Way]

This quick tutorial shows you the official way of installing Yarn package manager on Ubuntu and Debian Linux. You’ll also learn some basic Yarn commands and the steps to remove Yarn completely.

Yarn is an open source JavaScript package manager developed by Facebook. It is an alternative or should I say improvement to the popular npm package manager. Facebook developers’ team created Yarn to overcome the shortcomings of npm. Facebook claims that Yarn is faster, reliable and more secure than npm.

Like npm, Yarn provides you a way to automate the process of installing, updating, configuring, and removing packages retrieved from a global registry.

The advantage of Yarn is that it is faster as it caches every package it downloads so it doesn’t need to download it again. It also parallelizes operations to maximize resource utilization. Yarn also uses checksums to verify the integrity of every installed package before its code is executed. Yarn also guarantees that an install that worked on one system will work exactly the same way on any other system.

If you are using nodejs on Ubuntu, probably you already have npm installed on your system. In that case, you can use npm to install Yarn globally in the following manner:

sudo npm install yarn -g

However, I would recommend using the official way to install Yarn on Ubuntu/Debian.

Installing Yarn on Ubuntu and Debian [The Official Way]

Yarn JS

The instructions mentioned here should be applicable to all versions of Ubuntu such as Ubuntu 18.04, 16.04 etc. The same set of instructions are also valid for Debian and other Debian based distributions.

Since the tutorial uses Curl to add the GPG key of Yarn project, it would be a good idea to verify whether you have Curl installed already or not.

sudo apt install curl

The above command will install Curl if it wasn’t installed already. Now that you have curl, you can use it to add the GPG key of Yarn project in the following fashion:

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add –

After that, add the repository to your sources list so that you can easily upgrade the Yarn package in future with the rest of the system updates:

sudo sh -c ‘echo “deb https://dl.yarnpkg.com/debian/ stable main” >> /etc/apt/sources.list.d/yarn.list’

You are set to go now. Update Ubuntu or Debian system to refresh the list of available packages and then install yarn:

sudo apt update
sudo apt install yarn

This will install Yarn along with nodejs. Once the process completes, verify that Yarn has been installed successfully. You can do that by checking the Yarn version.

yarn –version

For me, it showed an output like this:

yarn –version
1.12.3

This means that I have Yarn version 1.12.3 installed on my system.

Using Yarn

I presume that you have some basic understandings of JavaScript programming and how dependencies work. I am not going to go in details here. I’ll show you some of the basic Yarn commands that will help you getting started with it.

Creating a new project with Yarn

Like npm, Yarn also works with a package.json file. This is where you add your dependencies. All the packages of the dependencies are cached in the node_modules directory in the root directory of your project.

In the root directory of your project, run the following command to generate a fresh package.json file:

It will ask you a number of questions. You can skip the questions r go with the defaults by pressing enter.

yarn init
yarn init v1.12.3
question name (test_yarn): test_yarn_proect
question version (1.0.0): 0.1
question description: Test Yarn
question entry point (index.js):
question repository url:
question author: abhishek
question license (MIT):
question private:
success Saved package.json
Done in 82.42s.

With this, you get a package.json file of this sort:

{
“name”: “test_yarn_proect”,
“version”: “0.1”,
“description”: “Test Yarn”,
“main”: “index.js”,
“author”: “abhishek”,
“license”: “MIT”
}

Now that you have the package.json, you can either manually edit it to add or remove package dependencies or use Yarn commands (preferred).

Adding dependencies with Yarn

You can add a dependency on a certain package in the following fashion:

yarn add <package_name>

For example, if you want to use Lodash in your project, you can add it using Yarn like this:

yarn add lodash
yarn add v1.12.3
info No lockfile found.
[1/4] Resolving packages…
[2/4] Fetching packages…
[3/4] Linking dependencies…
[4/4] Building fresh packages…
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ [email protected]
info All dependencies
└─ [email protected]
Done in 2.67s.

And you can see that this dependency has been added automatically in the package.json file:

{
“name”: “test_yarn_proect”,
“version”: “0.1”,
“description”: “Test Yarn”,
“main”: “index.js”,
“author”: “abhishek”,
“license”: “MIT”,
“dependencies”: {
“lodash”: “^4.17.11”
}
}

By default, Yarn will add the latest version of a package in the dependency. If you want to use a specific version, you may specify it while adding.

yarn add [email protected]

As always, you can also update the package.json file manually.

Upgrading dependencies with Yarn

You can upgrade a particular dependency to its latest version with the following command:

yarn upgrade <package_name>

It will see if the package in question has a newer version and will update it accordingly.

You can also change the version of an already added dependency in the following manner:

yarn upgrade [email protected]_or_tag

You can also upgrade all the dependencies of your project to their latest version with one single command:

yarn upgrade

It will check the versions of all the dependencies and will update them if there are any newer versions.

Removing dependencies with Yarn

You can remove a package from the dependencies of your project in this way:

yarn remove <package_name>

Install all project dependencies

If you made any changes to the project.json file, you should run either

yarn

or

yarn install

to install all the dependencies at once.

How to remove Yarn from Ubuntu or Debian

I’ll complete this tutorial by mentioning the steps to remove Yarn from your system if you used the above steps to install it. If you ever realized that you don’t need Yarn anymore, you will be able to remove it.

Use the following command to remove Yarn and its dependencies.

sudo apt purge yarn

You should also remove the Yarn repository from the repository list:

sudo rm /etc/apt/sources.list.d/yarn.list

The optional next step is to remove the GPG key you had added to the trusted keys. But for that, you need to know the key. You can get that using the apt-key command:

Warning: apt-key output should not be parsed (stdout is not a terminal) pub rsa4096 2016-10-05 [SC] 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310 uid [ unknown] Yarn Packaging

[email protected]

sub rsa4096 2016-10-05 [E] sub rsa4096 2019-01-02 [S] [expires: 2020-02-02]

The key here is the last 8 characters of the GPG key’s fingerprint in the line starting with pub.

So, in my case, the key is 86E50310 and I’ll remove it using this command:

sudo apt-key del 86E50310

You’ll see an OK in the output and the GPG key of Yarn package will be removed from the list of GPG keys your system trusts.

I hope this tutorial helped you to install Yarn on Ubuntu, Debian, Linux Mint, elementary OS etc. I provided some basic Yarn commands to get you started along with complete steps to remove Yarn from your system.

I hope you liked this tutorial and if you have any questions or suggestions, please feel free to leave a comment below.

Source

Tech Ethics New Year’s Resolution: Don’t Build Software You Will Regret | Linux.com

At The New Stack, we talk a lot about avoiding technical debt, but what about the ethical debt? Let’s begin by attempting to define just what ethical technical delivery even is. Black Pepper Software’s Sam Warner at the Good Tech Conf — a conference which focused on technology for social good — simplified this great university philosophy topic, saying ethical software:

  • causes no negative social impact
  • doesn’t make the world worse to live in

At Coed Ethics, another conference dedicated to tech ethics that The New Stack covered earlier this year, Doteveryone’s Sam Brown echoed Warner, saying “Responsible technology considers the social impact it creates and seeks to understand and minimalize its potential unintended consequences.” Doteveryone as an organization is dedicated to supporting responsible technology as a key business driver for positive and inclusive growth, innovation, and trust in technology.

But should those of us building the future’s code feel obligated to contribute something toward social good? Warner argues we should go even further than that and contribute to work that benefits the most amount of people in a significant way.

So, if this is our objective, where do we begin?

Read more at The New Stack

Source

SD Times news digest: SDM 1.2.0, Apache NetBeans 10.0, and Linux 4.20

Atomist has released Software Delivery Machine (SDM) 1.2.0. The release was mostly focused on fixing bugs, the company explained.

New features include an improved config command in the CLI, LazyProjectLoader for preventing eager cloning of Git projects, a convenience method for implementing ExecuteGoal instances, and more.

The release is also backwards compatible and can be used with any SDM that is running SDM 1.0.0 or higher.

Apache NetBeans 10.0 is now available
Apache has released Apache NetBeans 10.0. According to the company, this is the the second major release of the IDE.

Apache NetBeans 10.0 focuses on adding support for JDK 11, JUnit 5, PHP, JavaScript, and Groovy. The release also includes a number of bug fixes.

Linux 4.20 is now available
Linux 4.20 is now available, with improvements to networking, such as drivers, core networking fixes, and bpf. The release also includes some non-network driver updates and reverts a series of x86 inline asm changes that will not be necessary as a result of upcoming compiler support. A complete list of features can be found here.

Source

WP2Social Auto Publish Powered By : XYZScripts.com