Thank you for the opportunity to help you with your question!
In Linux and Unix systems, commands are executable files. The
commands may be specific with user environment.We can set the absolute
path of specific command as per user in environment.If we require the
information, to get the absolute path of command. In that case we will
To find the absolute path of command in Linux/Unix system, we use
which command-name OR which executable-file-name
echo $PATH command will show the directory path. The
which command, locate the command from these directories.
root@tuxworld:/# echo $PATH /usr/local/rvm/gems/ruby-2.1.0/bin:/usr/local/rvm/gems/ruby-2.1.0@global/bin:/usr/local/rvm/rubies/ruby-2.1.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/rvm/bin root@tuxworld:/#
Example : In this example,we will find the absolute path of useradd command.
The output from which command is showing the absolute path.
root@tuxworld:/# which useradd /usr/sbin/useradd root@tuxworld:/#
ls lists files and directories. If the pathname is a file, ls displays information on the file according to the requested options. If the pathname is a directory, ls displays information on the files and subdirectories therein. You may obtain information on a directory itself using the -d option.
If you do not specify any options, ls displays only the file name(s). When ls sends output to a pipe or a file, it writes one name per line; when it sends output to the terminal, it uses the -C (multi-column) format.
Please let me know if you need any clarification. I'm always happy to answer your questions.
Hi, this is how you can open up a terminal emulator window:
Shell Terminal Emulator. This app is a terminal
for Android phones. You can access your Android's built-in Linux
command line shell, and use many available commands (Linux/Unix) in your
device. It allows you to browse your phone, create or delete files and
Text Editor (gedit) is the default GUI text editor in the Ubuntu operating system. It is UTF-8 compatible and supports most standard text editor features as well as many advanced features. These include multilanguage spell checking, extensive support of syntax highlighting, and a large number of official and third party plugins.gedit is suited for both basic and more advanced text editing and is released under the GNU General Public License.
gedit is located in Ubuntu's Main repository and is installed by default. gedit can be installed in Kubuntu, Xubuntu and other distributions although additional libraries are necessary and will be installed on non-GNOME systems.
To install gedit:
Select gedit in Synaptic (System → Adminstration → Synaptic Package Manager)
- From a terminal or ALT-F2:
sudo apt-get install gedit
gedit incorporates a graphical user interface (GUI) and is opened by going to Applications → Accessories → Text Editor or by pressing Alt+F2 and typing gedit
Opening gedit via the command line allows the user to take advantage of several options unavailable from the GUI menu. If a path is not included in the startup command, gedit will look for the file in the current directory. If the file is not found, gedit will open a blank file with the file name entered on the command line:
To open a specific file:
To open multiple files:
gedit file1 file2
To edit system files such as sources.list and fstab, open it with administrative privileges. Note graphical applications use gksudo rather than sudo.
To open at a specific line number, useful when an error message includes the line number, include "+<line number>". (gksudo is used in this example since the file is a system file owned by root):
gksudo gedit +21 /etc/apt/sources.list
Several popular options which the user may wish to review after the initial installation are:
Create Backup Copy: Edit → Preferences → Editor tab. This option is enabled by default and creates a copy of the file before saving changes. Backup files saved in this manner are appended with a trailing "~". If the user does not want gedit to back up files in this manner, deselect the option.
Autosave: Edit → Preferences → Editor tab. This feature is not enabled by default. The user may also select the time between autosaves.
Spell Checker: Edit → Preferences → Plugins tab. This feature is enabled by default.
Plugins greatly enhance the power of gedit and are are accessed via Edit → Preferences → Plugins. More than a dozen plugins are pre-installed and can be enabled/disabled in this section. Some of the most popular are enabled by default while others must be enabled by the user.
- Tag List. Displays common tags in a side pane and allows for easy insertion into the file.
External Tools. One of the powerful default plugins available (but not enabled by default), External Tools allows the user to run external commands on the file being edited from within gedit itself.
Once this plugin is enabled, the user can select custom tools from the Tools menu.
The addition of shortcut keys and the configuration of tools from the External Tools Manager are accomplished via the Tools → External Tools... menu.
For descriptions of standard plugins distributed with the gedit package visit this link.
Many additional plugins are available from third-party resources. See the Links section near the bottom of this page.
A very useful feature of gedit is the ability to color programming code. Using syntax highlighting makes simple errors easier to recognize. gedit uses the GtkSourceView for syntax highlighting. The .lang file for a specific programing language is located in the /usr/share/gtksourceview-3.0/language-specs/ folder. These files may be edited or additional files created to further define the highlighting definitions.
Syntax highlighting is automatic and is selected in one of two methods. It can be chosen via the menu with View, Highlight Mode or via the lower statusbar. The statusbar, enabled via the View menu, displays programming language options for many types of sources, scripts, markup and scientific formats. A screenshot of the statusbar in use is located further down this page.
gedit provides a user-friendly way to make XML markup or Docbook XML for yelp and ubuntu documentation. The pictures and instructions given below use gedit 2.26.1. The recommended changes help take full advantage of the syntax color highlighting which gedit provides.
- Under the View tab make the following selections. Selecting most of the options just make life easier.
- The next change to make is under Editor tab. As one can see there is not much to do here.
Next is the Plugins Tab. A screenshot of the plugins tab is available in the Plugins section above. There are a number of changes you can make on the Plugins page, the most important perhaps is the Tag List option. Experiment with other plugins and see what they do. This link gives a brief explanation of each default plugin.
Now comes the most interesting part, go to View > Highlight Mode > Markup and while we want Docbook one can also see XML and both look slightly different from each other:
[img alt="geditdocbook2.png" class="attachment" src="https://help.ubuntu.com/community/gedit?action=AttachFile&do=get&target=geditdocbook2.png" title="geditdocbook2.png">
The above one is when the text is highlighted using geditdocbook. The same text when highlighted using XML looks like:
Experiment with gedit's settings and markup in general to have a feel of what works best for you.
If you are running Ubuntu and attempt to remove gedit via Synaptic or apt, the system will also attempt to remove the ubuntu-desktop metapackage. If you try to remove ubuntu-desktop specifically in Synaptic the user will be cautioned with:
This package depends on all of the packages in the Ubuntu desktop system. It is also used to help ensure proper upgrades, so it is recommended that it not be removed.
welcome. Let me send you how you can edit text files using nano and vim
HOW TO EDIT A TEXT FILE USING NANO AND VIM:
Nano is a very easy-to-use free pico clone that comes installed by default in Ubuntu. This is definitely a great console text editor for those who are unfamiliar with more advanced ones such as vim.
To use nano to edit a file, do the following in a terminal, where 'filename' is the name of the file you want create or modify:
The important command shortcuts are displayed at the bottom of nano's screen, denoted by a ^ and a shortcut character. The ^ stands for the Ctrl character on your keyboard. For example, the exit shortcut on nano is ^X, so to exit nano you would hold down Ctrl and press x.
For more information on this editor, please see the documentation (http://www.nano-editor.org/docs.html).
ee and aee
ee (Easy-Edit) and aee (Advanced Easy Editor) are two similar very easy to use console text editors. Like nano, keyboard shortcuts are performed by holding Ctrl and pressing the correct shortcut keys. Common shortcuts are listed at the top of the screen. There is also a handy menu system that can be accessed by pressing Esc.
Of the two, I prefer aee simply because the main menu loads slightly faster. Apart from that, their keyboard shortcut sequences are slightly different, but all the shortcuts are listed at the top of the screen. ee is the default text editor of FreeBSD (http://www.freebsd.org/).
To install these editors, you will need to enable the Universe repository (http://www.ubuntuforums.org/showthread.php?t=179).
After doing so, open a terminal and do the following to install ee:
sudo apt-get install ee
Or, for aee:
sudo apt-get install aee
To create or modify a file with these editors, do the following in a terminal, where 'filename' is the name of the file you want to edit or create:
Or, for aee:
This powerful vi clone is installed by default on nearly all Linux systems, including Ubuntu. It has many advanced features such as syntax highlighting (a feature that color codes key words in programming languages and configuration files). If you prefer a more feature-packed text editor than nano and the rest, this is a good one.
To use vim to edit a file, do the following in a terminal, where 'filename' is the name of the file you want to create or modify:
To get syntax highlighting to work, do the following in a terminal:
cp /usr/share/vim/vim63/vimrc_example.vim ~/.vimrc
Contact me whenever you experience any difficulty. I humbly request that you kindly add to me even some few dollars in addition to the one dollar you gave me for the first question. Remember am here to help you 24 hours, my interest is to see you succeed in your work and studies.
Thank you for that consideration.
You are most welcome.
I will highly appreciate that.
Hello, hope you are doing quite fine.
I was just checking on how far you have reached with the consideration you were supposed to do me concerning some money increment on the question I helped you in.
I will be more than glad to receive it.
Content will be erased after question is completed.