Semenalidery.com

IT Новости из мира ПК
7 просмотров
Рейтинг статьи
1 звезда2 звезды3 звезды4 звезды5 звезд
Загрузка...

Post install linux

Ubuntu Post Installation Script To Install Essential Applications

by sk · Published December 19, 2016 · Updated December 17, 2019

Ubuntu is a very user-friendly operating system ever I have used. It has everything an average Linux user wants in his Desktop. However, it doesn’t comes with all necessary pre-installed stuffs for day to day usage. You might still have to install some additional important software in order to get a near perfect system. You can manually install packages one by one, but It’s bit time consuming task. Alternatively, use the following script called post_install.sh written by a fellow Linux user Waleed ahmad. He made this script to make the Ubuntu post installation tasks easier. Just grab this script and run it with root privileges and install the necessary applications. This is script is available in GitHub. It is completely free to use.

This script will install the following applications.

  1. Sublime Text 3,
  2. LAMP Stack,
  3. Build Essentials,
  4. Node.js,
  5. Git,
  6. Composer,
  7. JDK 8,
  8. Bleachbit,
  9. Ubuntu Restricted Extras,
  10. VLC Media Player,
  11. Unity Tweak Tool,
  12. Google Chrome,
  13. Teamiewer,
  14. Skype,
  15. Paper GTK Theme,
  16. Arch Theme,
  17. Arc Icons,
  18. Numix Icons,
  19. Multiload Indicator,
  20. Pensor,
  21. Netspeed Indicator,
  22. Generate SSH Keys,
  23. Ruby,
  24. Sass,
  25. Vnstat,
  26. Webpack,
  27. Grunt,
  28. Gulp.

Run Ubuntu Post Installation Script

Download the script from here or use the following command to download it using wget command:

I have saved this file as post_install.sh. You can name it as per your liking. Then, make it as executable using command:

Finally, run this script as ‘sudo’ user:

This script will automatically update/upgrade your Ubuntu desktop before installing any software.

Once it updated your system, then it will display the list of essential applications you would like to have in your Ubuntu desktop. Just choose any application(s) you want to install and hit ENTER key. This script will download the selected applications along with all required dependencies in minutes.

Very simple, isn’t it? What are you waiting for go get this script and start installing the packages you want.

Hope this script helps you. More details, refer the official GitHub page.

Installation

It is possible to install any init system (openrc, runit, s6) from any ISO.

Fresh Artix installation from bootable media

Artix can either be installed through the console or the GUI installer. The GUI install is quite straightforward, we’ll focus on the console installation procedure here. The installation images are confirmed to work on both BIOS and UEFI systems.

Set the keyboard layout (or just use the US layout)

To check the available layout types:

Then type the name of the layout without the extension. For example, to set the Spanish(Spain) layout, type:

This only sets the selected keyboard layout in the current tty and only until reboot. To make the setting permanent, you have to edit /etc/conf.d/keymaps in the installed system.

Partition your disk (BIOS)

Partition your hard drive ( /dev/sda will be used in this guide) with fdisk or cfdisk, the partition numbers and order are at your discretion:

If you want to install side-by-side with other operating systems, you must make some space on the disk by resizing the existing partitions. You may use gparted for this, however detailed instructions are out of the scope of this guide. See the ArchWiki

NOTE: The BIOS boot partition is necessary on UEFI systems with a GPT-partitioned disk. EFI system partition has to be created and mounted at /mnt/boot or /mnt/efi , and the suggested size is around 512 MiB.

Format partitions

Next, format the new partitions, we will use ext4 in this example:

The -L switch assigns labels to the partitions, which helps referring to them later through /dev/disk/by-label without having to remember their numbers

Mount Partitions

Now, activate your swap space and mount your partitions:

Connect to the internet

A working internet connection is required and assumed. A wired connection is setup automatically, if found. Wireless ones must be configured by the user. Verify your connection and update the repositories:

Install base system

Use basestrap to install the base and optionally the base-devel package groups and your preferred init (currently available: openrc , runit , and s6 ):

If you encounter errors, you can use the -i flag of basestrap (‘interactive’). Example:

and you will be prompted to choose the respective elogind.

Install a kernel

Artix provides two kernels linux-lts and linux , but you can use any other kernel you like (‘-ck, -pf, -zen’ etc). While optional, it is recommended to install linux-firmware . You can try not installing it, but some devices such as network cards may not work.

Use fstabgen to generate /etc/fstab , use -U for UUIDs and -L for partition labels:

Check the resulting fstab for errors before rebooting. Now, you can chroot into your new Artix system with:

Configure the base system

Set system clock

Set the time zone:

Run hwclock to generate /etc/adjtime:

Note that this will default to UTC. If you use Windows and you want the time to be synchronized in both Artix and Windows, follow System_time#UTC_in_Windows:ArchWiki for instructions to enable UTC in there also.

Localization

Install a text editor of your choice (let’s use nano here) and edit /etc/locale.gen , uncommenting the locales you desire:

Generate your desired locales running:

To set the locale systemwide, create or edit /etc/locale.conf (which is sourced by /etc/profile ) or /etc/bash/bashrc.d/artix.bashrc or /etc/bash/bashrc.d/local.bashrc ; user-specific changes may be made to their respective

/.bashrc , for example:

Boot Loader

First, install grub and os-prober (for detecting other installed operating systems):

NOTE: On GPT-partitioned drives, refer to ArchWiki:Grub article.

Alternatively, you can use some other bootloaders or even the own kernel using EFISTUB. Bear in mind that we won’t cover them here since most are not supported officially and the Arch Wiki already provides enough documentation. See the ArchWiki:Bootloader article if you want to view the alternatives.

Add user(s)

First, set the root passwd:

Second, create a regular user and password:

Network configuration

Create the hostname file and install a DHCP client:

OpenRC

Install connman and optionally a front-end:

Runit

Install connman and optionally a front-end:

Install connman and optionally a front-end:

Alternatively, if you will use openrc , Gentoo’s netifrc modules can be used, these are located in /etc/init.d/ and work on a script-per-interface basis.

Now the parent script /etc/init.d/net.lo should be symlinked to create additional scripts for each network interface and then loaded into an openrc runlevel.

Reboot the system

Now, you can reboot and enter into your new installation:

Post installation configuration

Once shutdown is complete, remove your installation media. If all went well, you should boot into your new system. Log in as your root to complete the post-installation configuration. To get a graphical environment you need to install the xorg group; there’s an undergoing cleanup which leads to problems currently (2020-01) and can be resolved by ignoring xorg-server-xdmx:

Choose your packages, or just install all of them. For the closed-source nvidia drivers you can use the nvidia-lts package, as our default kernel is linux-lts:

Older nvidia cards work with the legacy series, nvidia-340xx-lts and nvidia-304xx-lts. If you want to run a custom kernel, you can install the respective nvidia dkms package which ensures all installed kernels get their nvidia modules. AMD and Intel cards enjoy excellent (or near-excellent) 3D support with open-source drivers. Read the Arch wiki, for information on how Xorg chooses the best available video driver and which one is optimal for your hardware.

Desktop Environment

Install a desktop environment, for example MATE, XFCE4 or LXQt:

Display Login Manager

A display manager, like LightDM, LXDM or SDDM may be desirable:

If using OpenRC:

Or you can use .xinitrc to launch your DE manually; edit (or create)

/.xinitrc and add exec mate-session. Notice: mate-session and quite a few other packages from the Arch repositories are compiled against systemd even if they don’t actually use it, at least not as PID1; to satisfy the library link you may install elogind and its services files elogind-openrc, elogind-runit, or elogind-s6.

Installation

It is possible to install any init system (openrc, runit, s6) from any ISO.

Fresh Artix installation from bootable media

Artix can either be installed through the console or the GUI installer. The GUI install is quite straightforward, we’ll focus on the console installation procedure here. The installation images are confirmed to work on both BIOS and UEFI systems.

Set the keyboard layout (or just use the US layout)

To check the available layout types:

Then type the name of the layout without the extension. For example, to set the Spanish(Spain) layout, type:

This only sets the selected keyboard layout in the current tty and only until reboot. To make the setting permanent, you have to edit /etc/conf.d/keymaps in the installed system.

Partition your disk (BIOS)

Partition your hard drive ( /dev/sda will be used in this guide) with fdisk or cfdisk, the partition numbers and order are at your discretion:

If you want to install side-by-side with other operating systems, you must make some space on the disk by resizing the existing partitions. You may use gparted for this, however detailed instructions are out of the scope of this guide. See the ArchWiki

NOTE: The BIOS boot partition is necessary on UEFI systems with a GPT-partitioned disk. EFI system partition has to be created and mounted at /mnt/boot or /mnt/efi , and the suggested size is around 512 MiB.

Format partitions

Next, format the new partitions, we will use ext4 in this example:

The -L switch assigns labels to the partitions, which helps referring to them later through /dev/disk/by-label without having to remember their numbers

Mount Partitions

Now, activate your swap space and mount your partitions:

Connect to the internet

A working internet connection is required and assumed. A wired connection is setup automatically, if found. Wireless ones must be configured by the user. Verify your connection and update the repositories:

Install base system

Use basestrap to install the base and optionally the base-devel package groups and your preferred init (currently available: openrc , runit , and s6 ):

If you encounter errors, you can use the -i flag of basestrap (‘interactive’). Example:

and you will be prompted to choose the respective elogind.

Install a kernel

Artix provides two kernels linux-lts and linux , but you can use any other kernel you like (‘-ck, -pf, -zen’ etc). While optional, it is recommended to install linux-firmware . You can try not installing it, but some devices such as network cards may not work.

Use fstabgen to generate /etc/fstab , use -U for UUIDs and -L for partition labels:

Check the resulting fstab for errors before rebooting. Now, you can chroot into your new Artix system with:

Configure the base system

Set system clock

Set the time zone:

Run hwclock to generate /etc/adjtime:

Note that this will default to UTC. If you use Windows and you want the time to be synchronized in both Artix and Windows, follow System_time#UTC_in_Windows:ArchWiki for instructions to enable UTC in there also.

Localization

Install a text editor of your choice (let’s use nano here) and edit /etc/locale.gen , uncommenting the locales you desire:

Generate your desired locales running:

To set the locale systemwide, create or edit /etc/locale.conf (which is sourced by /etc/profile ) or /etc/bash/bashrc.d/artix.bashrc or /etc/bash/bashrc.d/local.bashrc ; user-specific changes may be made to their respective

/.bashrc , for example:

Boot Loader

First, install grub and os-prober (for detecting other installed operating systems):

NOTE: On GPT-partitioned drives, refer to ArchWiki:Grub article.

Alternatively, you can use some other bootloaders or even the own kernel using EFISTUB. Bear in mind that we won’t cover them here since most are not supported officially and the Arch Wiki already provides enough documentation. See the ArchWiki:Bootloader article if you want to view the alternatives.

Add user(s)

First, set the root passwd:

Second, create a regular user and password:

Network configuration

Create the hostname file and install a DHCP client:

OpenRC

Install connman and optionally a front-end:

Runit

Install connman and optionally a front-end:

Install connman and optionally a front-end:

Alternatively, if you will use openrc , Gentoo’s netifrc modules can be used, these are located in /etc/init.d/ and work on a script-per-interface basis.

Now the parent script /etc/init.d/net.lo should be symlinked to create additional scripts for each network interface and then loaded into an openrc runlevel.

Reboot the system

Now, you can reboot and enter into your new installation:

Post installation configuration

Once shutdown is complete, remove your installation media. If all went well, you should boot into your new system. Log in as your root to complete the post-installation configuration. To get a graphical environment you need to install the xorg group; there’s an undergoing cleanup which leads to problems currently (2020-01) and can be resolved by ignoring xorg-server-xdmx:

Choose your packages, or just install all of them. For the closed-source nvidia drivers you can use the nvidia-lts package, as our default kernel is linux-lts:

Older nvidia cards work with the legacy series, nvidia-340xx-lts and nvidia-304xx-lts. If you want to run a custom kernel, you can install the respective nvidia dkms package which ensures all installed kernels get their nvidia modules. AMD and Intel cards enjoy excellent (or near-excellent) 3D support with open-source drivers. Read the Arch wiki, for information on how Xorg chooses the best available video driver and which one is optimal for your hardware.

Desktop Environment

Install a desktop environment, for example MATE, XFCE4 or LXQt:

Display Login Manager

A display manager, like LightDM, LXDM or SDDM may be desirable:

If using OpenRC:

Or you can use .xinitrc to launch your DE manually; edit (or create)

/.xinitrc and add exec mate-session. Notice: mate-session and quite a few other packages from the Arch repositories are compiled against systemd even if they don’t actually use it, at least not as PID1; to satisfy the library link you may install elogind and its services files elogind-openrc, elogind-runit, or elogind-s6.

Kali Linux 2.0 Top 10 Post Install Tips

With Kali 2.0 now released, we wanted to share a few post-install procedures we find ourselves repeating over and over, in the hopes that you will find them useful as well. We’ve also slapped in some answers to common questions we’ve been getting. Here is our top 10 list:

Enable or Disable the Intelligent Sidebar Option

Some people love it, some people hate it. In smaller resolutions, it can be annoying. We’re talking about the disappearing sidebar on the left of the screen. Here’s a short video showing how to change this behaviour.

Add Your SSH Public Key to Kali 2.0

Kali Linux 2.0 takes on the Debian SSH configuration option, the default since Jessie, which disallows root logins without a key.

# grep Root / etc / ssh / sshd_config
PermitRootLogin without-password

The less preferred alternative is to change the PermitRootLogin parameter to “yes” and restart the SSH server, which will allow remote password root logins. For safer remote root SSH access, add your public key to the /root/.ssh/authorized_keys file.

Install NVIDIA Drivers if You Need Them

If you have a NVIDIA graphics card, you should follow these instructions to get the NVIDIA drivers installed in Kali 2.0.

Install VMware or VirtualBox Guest Tools if You Need Them

Our instructions for installing virtual guest tools haven’t changed much and work well on the latest version of VMware (Workstation and Fusion), as well as VirtualBox.

Disable the Screen Lock Gnome Feature

We missed disabling this feature in our official builds but will do so in an upcoming update and future ISO releases. This is the fastest way to disable the Gnome screen lock feature:

Don’t Add Extra Repositories to Your Kali 2.0 Install

If for some reason you chose “no” when asked “use a network mirror” during your Kali installation, you may be missing some entries in your sources.list file. If this is the case, check the official repository list for the entries that should be in that file. Despite what many unofficial guides instruct you to do, avoid adding extra repositories to your sources.list file. Don’t add kali-dev, kali-rolling, or any other Kali repositories unless you have a specific reason to – which usually, you won’t. If you *must* add additional repositories, drop a new sources file in /etc/apt/sources.list.d/ instead.

Add a Non-root User if You’re Not Comfortable Running as root

We see many people leery of using Kali due to the fact that the main OS user is root. This often confuses us, as adding a non-root user to Kali is trivial and can be done by simply issuing commands similar to the following (just change the “muts” username to your own):

# useradd -m muts -G sudo -s /bin/bash
root@kali:

# passwd muts
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@kali:

Avoid Installing Flash Player

Keep the Kali System Up to Date

We pull upstream updates from Debian 4 times a day. This ensures that security updates are implemented in Kali on an ongoing basis. You should keep your system up to date by regularly running the following commands:

Avoid Manual Installations of Tools in FHS Defined Directories

There are several ways you can use Kali – either as a “throw away pentesting machine” or as a “long term use OS“. The “throw away” method entails setting up Kali for a one-off engagement or short term use and then killing off the OS when done (this usually happens in virtual environments). The “long term use” use-case describes people who want to use Kali on an ongoing basis for day-to-day use. Both methods are perfectly valid but require different treatment. If you plan to use Kali on a day-to-day basis, you should avoid manual installs of programs in FHS defined directories as this would conflict with the existing apt package manager.

Ubuntu post installation script for installing software of your choice

by Magesh Maruthamuthu · Last Updated: February 17, 2020

A while ago we have covered an article about set of post-installation shell scripts for Ubuntu, Fedora & Solus. Today also we are going to discuss about similar kind of topics. Both script has their own unique style and features.

One major different between the script which I identified that the previous one doesn’t give an option to choose required choice of applications and offering the application category but this one has applications choice and doesn’t offer application category, also it will update the system to latest available updates every time, before perform the application installation and rest are same.

Ubuntu post installation script will help us to install some of the important software’s which is necessary to perform day to day operation in single click without headache.

Why we need post installation script ? Regular Linux users might knowing the required application which can be installed on system to use day to day operation but newbies doesn’t knows these application. It has become very handy to both of them, how ? Experienced users can install the application in single shot instead of spending hell lots of time for manual installation, even if he knows. Newbies can blindly install all since they don’t know about application name and purpose.

Currently developer has added twenty eight application in the script, he may add more in feature and it should be run as root.

The following applications are included in script.

  • Sublime Text 3
  • LAMP Stack
  • Build Essentials
  • Node.js
  • Git
  • Composer
  • JDK 8
  • Bleachbit
  • Ubuntu Restricted Extras
  • VLC Media Player
  • Unity Tewak Tool
  • Google Chrome
  • Teamiewer
  • Skype
  • Paper GTK Theme
  • Arch Theme
  • Arc Icons
  • Numix Icons
  • Multiload Indicator
  • Pensor
  • Netspeed Indicator
  • Generate SSH Keys
  • Ruby
  • Sass
  • Vnstat
  • Webpack
  • Grunt
  • Gulp

How to install & use ?

Simply clone the repository from developer GitHub page and run the post-install.sh file from the directory, which will open the small GUI where we can see all the available applications. Make sure you have to run the script from privilege user.

When we run the post_install.sh script for the first time, I got the below error message.

It’s working fine after commenting the line 210. I have added the bug to developer GitHub page. Hope he will fix the issue in upcoming release.

The script will update the system applications every time when you run, then bring the GUI for application installation.

Script will bring the GUI, after successfully upgraded the system to latest available application.

Just tick the required application which you want to install using Space Bar then hit OK button to process the installation. Press Down Arrows to see all available applications.

Script will automatically exit after installing the selected applications.

Читать еще:  Linux passwd user
Ссылка на основную публикацию
Adblock
detector