Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Linux novice common commands     - Oracle query start with connect by tree (Database)

- Linux user status query, and to unlock locked user (Linux)

- Error: Unable to establish connection with FTP SFTP server (Server)

- Nginx + Tomcat static and dynamic load balancing and separation configuration essentials under Linux (Server)

- SELinux security permissions HTTP + PHP service changes (Server)

- Java object serialization (Programming)

- Installation Experience open source car Automotive Grade Linux system (Linux)

- Linux using TCP-Wrapper Service Management (Linux)

- Linux, MySQL root privilege escalation another method (Linux)

- Mac OS X 10.9 compiler OCI8 module (Programming)

- UUID in Java (Programming)

- JDK comes with tools JPS (Linux)

- MySQL multi-master-slave synchronization (Database)

- Camouflage Nginx Web server version to prevent invasion (Linux)

- MySQL EXPLAIN SQL output description (Database)

- Android Studio simple setup (Linux)

- Handle large data problems Bit-map method (Programming)

- SSH port forwarding application (Server)

- Java and Python use make way dictionary word search script (Programming)

- Some common regular expressions (Linux)

  Linux novice common commands
  Add Date : 2016-07-09      
  On Fedora use dnf command line to manage the system update

Linux-based systems the most wonderful thing is that you can use the command line in a terminal to manage the entire system. The advantage of using the command line, you can use the same knowledge and skills to manage just what Linux distribution.

For each release, and desktop environment (DE), in order to consistently it is almost impossible to use graphical user interface (GUI), because they provide their own user interface. To be clear, in some cases on different distributions need to use different commands to perform certain tasks, however, it is their basic idea and purpose is the same.

In this article, we are going to discuss some of the basic commands Linux user should grasp. I'll show you how to use the command line to update the system, management software, file operations and switching to root, these operations will be carried out on three major releases: Ubuntu (which also includes a customized version and derivative version, as well as Debian) , openSUSE, and Fedora.

let's start!


To keep the system safe and up to date

Linux is based on the safe design, but the fact is that any software that has defects lead to security vulnerabilities. So, keep your system up-to-date is very important. Think of it: running outdated operating system, just like you are sitting heavily armed tanks inside, but the door did not lock. Weapons will protect you? Anyone can enter the open door, cause you harm. Similarly, in your system also has unpatched vulnerabilities can jeopardize your system. The open source community, unlike the world of patents, the reaction in terms of patches is quite fast, so if you keep the system current, you also get the security guarantees.

Watching the news site for security vulnerabilities. If you find a flaw, understand it, and then update the patch out of the first time. Anyway, in a production environment, you must run at least once every week update command. If you are running a complex server, then it would have extra careful. Carefully read the change log to ensure that the update is not ruining your custom services.

Ubuntu: keep in mind one thing: before you install or upgrade the system software no matter what, you have to refresh the repository (ie repos). On Ubuntu, you can use the following command to update the system, the first command is used to refresh the warehouse:

sudo apt-get update
After the warehouse update, now you can run a system update command:

sudo apt-get upgrade
However, this command does not update the kernel and other packages, so you must also run the following command:

sudo apt-get dist-upgrade
openSUSE: If you are on openSUSE, you can use the following command to update the system (as usual, meaning the first command is to update the warehouse):

sudo zypper refresh
sudo zypper up
Fedora: If you're on Fedora, you can use the 'dnf' command, which is zypper and apt-get is 'similar':

sudo dnf update
sudo dnf upgrade

Software installation and removal

You can install only those enabled on your system repository packages available, the releases are shipped with default and enabled some official or third party repository.

Ubuntu: To install the package on Ubuntu, first update the warehouse, and then use the following statement:

sudo apt-get install [package_name]

sudo apt-get install gimp
openSUSE: command like this:

sudo zypper install [package_name]
Fedora: Fedora has abandoned the 'yum', now replaced by 'dnf', so a command like this:

sudo dnf install [package_name]
The process for removing the software is the same, as long as the 'install' changed to 'remove'.


sudo apt-get remove [package_name]

sudo zypper remove [package_name]

sudo dnf remove [package_name]

How to manage third-party software?

In a large developer community, these developers to provide users with a lot of software. Different distros have different mechanisms to these third-party software available to the user. Of course, but also on how these software developers to users, some developers will provide binary packages, while other software developers will be posted to the warehouse.

Ubuntu a lot of places are used PPA (personal package archive), but, unfortunately, it does not provide a built-in tool to help search for these PPA repository. Before installing the software, you will need a Google search PPA, and manually add the warehouse. The following is added to PPA systems:

sudo add-apt-repository ppa:
Example: For example, I want to add LibreOffice PPA to my system. I should Google the PPA, and get the name of the warehouse from the Launchpad, in this case it is "libreoffice / ppa". Then, use the following command to add the PPA:

sudo add-apt-repository ppa: libreoffice / ppa
It will ask you to press the Enter key to import the key. When done, use the 'update' command to refresh the repository, then install the package.

openSUSE has a elegant solution for third-party applications. You can access software.opensuse.org, a click on the search button and install the appropriate package, it automatically adds the repository to your system. If you want to manually add a repository, use this command:

sudo zypper ar -f url_of_the_repo name_of_repo
sudo zypper ar -f http://download.opensuse.org/repositories/LibreOffice:Factory/openSUSE_13.2/LibreOffice:Factory.repo LOF
Then, refresh the warehouse and install the software:

sudo zypper refresh
sudo zypper install libreoffice
Fedora users need only add RPMFusion (including free software and non-free software warehouse), the warehouse contains a large number of applications. If you need to add the repository with the following command:

dnf config-manager --add-repo http://www.example.com/example.repo

Some basic commands

I have written a number of articles on the use of CLI to manage files on your system, here are some of the basic commands are often used on all releases.

Copy a file or directory to a new location:

cp path_of_file_1 path_of_the_directory_where_you_want_to_copy /
Copy all files in a directory to a new location (note the slash and asterisk, it means that all files in the directory):

cp path_of_files / * path_of_the_directory_where_you_want_to_copy /
Move a file from one location to another (the end of the slash is said in this directory):

mv path_of_file_1 path_of_the_directory_where_you_want_to_move /
All files will be moved from one location to another:

mv path_of_directory_where_files_are / * path_of_the_directory_where_you_want_to_move /
To delete a file:

rm path_of_file
To delete a directory:

rm -r path_of_directory
Remove all the contents of the directory, intact directory folder:

rm -r path_of_directory / *

Create a new directory

To create a new directory, you have to first enter the location to create the directory. For example, you want to create a file called 'foundation' folder in your Documents directory. Let's use the cd (ie change directory, change directory) command to change directories:

cd / home / swapnil / Documents
(Replace 'swapnil' system for your user name)

Then, use the mkdir command to create the directory:

mkdir foundation
You can also create a directory from anywhere, by specifying the directory path. E.g:

mdkir / home / swapnil / Documents / foundation
If you want to connect together to create a parent directory, you can use the -p option. It creates all directories in the specified path:

mdkir -p / home / swapnil / Documents / linux / foundation

Become root

You may need to become root, or a user with sudo powers to implement some administrative tasks, such as managing the package or on the file in the root directory or under some modifications. One example is the editor 'fstab' file, which records the mounted hard drive. It 'etc' directory, and the directory and in the root directory, you only as a super user to modify the file. In most distributions, you can 'su' to become root. For example, on openSUSE, I want to become root, because I have to work in the root directory, you can use one of the following commands:

sudo su -

su -
The command will be asked to enter a password, and then you have the root privilege. Remember one thing: Do not root user to run the system, unless you know what you're doing. Another important point to note is that what you order after root directory or file is modified, they will have to change the relationship from the user or a particular service root. You must restore these files have a relationship, otherwise the service or the user can not access or write to those files. To change the user, the command is as follows:

sudo chown -R user: group file or directory name
When you partition will mount on other releases into the system, you may often need the operation. When you try to access files on those partitions, you might encounter permission denied error, you only have to change the relationship of these partitions you can access them. Need extra careful of is not to change the root directory permissions or have relationships.

These are the basic commands Linux novices need. If you have any questions, or if you want us to cover a particular topic, please let us know in the comments below it.
- To install JDK1.7 and compiler Hadoop-2.7.1 under CentOS7 (Server)
- How to use Quagga BGP (Border Gateway Protocol) router to filter BGP routing (Linux)
- 12 kinds of detection of CPU information on a Linux system tools (Linux)
- Ubuntu 15.04 and CentOS 7 to deploy .NET, Mono and DNX (Server)
- Linux System Getting Started Tutorial: Installing Brother printer in Linux (Linux)
- To install Cinnamon desktop environment on your Ubuntu 14.04 / 12.04 (Linux)
- Use the top command (Linux)
- Linux and hardware (Linux)
- Java proxy use and proxy principle (Programming)
- Linux Services Comments (Linux)
- Build a super simple "hardware" firewall router (Linux)
- Android source code compiled fatal error solutions (Programming)
- Java concurrent programming using the synchronized keyword ReentrantLock alternative primitive (Programming)
- Install Rubinius testing Ubuntu 14.04 native threads (Linux)
- Android media library of analysis: MediaProvider (Programming)
- Variables Python variables (Programming)
- DOM event handlers add notes (Programming)
- Linux commands with browsing and downloading files (Linux)
- Experience CoreCLR stack unwinding characteristics of initial implementation on Linux / Mac (Linux)
- How LUKS encrypted disk / partition to perform remote incremental backup (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.