I'm trying to figure out if theres a way to rename or use some sort of tag that points to a package instead of having to write the whole name of the package in the command line? because some packages have very long names so I don't want to be typing it every time.
-
2Don't you have tab completion? Which shell are you using?– heemaylMay 8, 2016 at 4:33
-
If you don't have tab completion, use variables.– muruMay 8, 2016 at 4:44
-
Why do you need to type a package's name so often anyway? Are you sure you really mean package, and not something else such as command?– fkraiemMay 8, 2016 at 5:21
-
Sorry i'm new in linux, and i'm learning as i go with it. Yeah i totally meant command, but again the tab completion was really helpful– CrioMay 9, 2016 at 8:22
Add a comment
|
1 Answer
just use shell autocompletion. Using bash (ubuntu user default shell) just do your command write part of the package name then press TAB
apt-cache showpkg firef<TAB>
In this case the shells line editor should complete to
apt-cache showpkg firefox
if the match is ambiguous (i.e. if there are multiple packages that start with firef
) it should show a list of potential matches